update with changes from Production branch

This commit is contained in:
Lee Lawlor
2014-02-17 12:05:39 -05:00
parent 5b640cf9d8
commit a4937fb2e5
384 changed files with 14690 additions and 2242 deletions

View File

@ -2,25 +2,23 @@ require File.expand_path('../boot', __FILE__)
require 'rails/all'
if defined?(Bundler)
# If you precompile assets before deploying to production, use this line
# Bundler.require *Rails.groups(:assets => %w(development test))
# If you want your assets lazily compiled in production, use this line
Bundler.require(:default, :assets, Rails.env)
end
Bundler.require(:default, Rails.env)
module Thingspeak
class Application < Rails::Application
# Settings in config/environments/* take precedence over those specified here.
# Application configuration should go into files in config/initializers
# -- all .rb files in that directory are automatically loaded.
# Custom directories with classes and modules you want to be autoloadable.
# config.autoload_paths += %W(#{config.root}/extras)
config.autoload_paths += %W(#{config.root}/lib)
# Only load the plugins named here, in the order given (default is alphabetical).
# :all can be used as a placeholder for all plugins not explicitly named.
# config.plugins = [ :exception_notification, :ssl_requirement, :all ]
# fix invalid utf8 characters
config.middleware.insert_before "Rack::Runtime", Rack::UTF8Sanitizer
# allow xml params
config.middleware.insert_after ActionDispatch::ParamsParser, ActionDispatch::XmlParamsParser
# allow frames to work
config.action_dispatch.default_headers = { 'X-Frame-Options' => 'ALLOWALL' }
# Activate observers that should always be running.
# config.active_record.observers = :cacher, :garbage_collector, :forum_observer
@ -29,23 +27,18 @@ module Thingspeak
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
# config.time_zone = 'Central Time (US & Canada)'
# must be placed before other config.i18n lines
config.i18n.enforce_available_locales = false
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
config.i18n.default_locale = :en
# JavaScript files you want as :defaults (application.js is always included).
# config.action_view.javascript_expansions[:defaults] = %w(jquery rails)
# Configure the default encoding used in templates for Ruby 1.9.
config.encoding = "utf-8"
# Configure sensitive parameters which will be filtered from the log file.
config.filter_parameters += [:password]
# Enable the asset pipeline
config.assets.enabled = true
# Version of your assets, change this if you want to expire all your assets
config.assets.version = '1.0'
end
end

50
config/database.yml.local Normal file
View File

@ -0,0 +1,50 @@
# MySQL. Versions 4.1 and 5.0 are recommended.
#
# Install the MySQL driver:
# gem install mysql
# On Mac OS X:
# sudo gem install mysql -- --with-mysql-dir=/usr/local/mysql
# On Mac OS X Leopard:
# sudo env ARCHFLAGS="-arch i386" gem install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config
# This sets the ARCHFLAGS environment variable to your native architecture
# On Windows:
# gem install mysql
# Choose the win32 build.
# Install MySQL and put its /bin directory on your path.
#
# And be sure to use new-style password hashing:
# http://dev.mysql.com/doc/refman/5.0/en/old-client.html
development:
adapter: mysql2
encoding: utf8
reconnect: false
database: thingspeak_development
pool: 5
username: thing
password: "speak"
# socket: /var/lib/mysql/mysql.sock
socket: /var/run/mysqld/mysqld.sock
# Warning: The database defined as "test" will be erased and
# re-generated from your development database when you run "rake".
# Do not set this db to the same as development or production.
test:
adapter: mysql2
encoding: utf8
reconnect: false
database: thingspeak_test
pool: 5
username: thing
password: "speak"
# socket: /var/lib/mysql/mysql.sock
socket: /var/run/mysqld/mysqld.sock
production:
adapter: mysql2
encoding: utf8
reconnect: true
database: thingspeak_production
pool: 5
username: root
password: "notimplemented"
socket: /var/run/mysqld/mysqld.sock

View File

@ -6,8 +6,9 @@ Thingspeak::Application.configure do
# since you don't have to restart the webserver when you make code changes.
config.cache_classes = false
# Log error messages when you accidentally call methods on nil.
config.whiny_nils = true
config.eager_load = false
config.assets.prefix = "/dev-assets"
# Show full error reports and disable caching
config.consider_all_requests_local = true
@ -19,20 +20,7 @@ Thingspeak::Application.configure do
# Print deprecation notices to the Rails logger
config.active_support.deprecation = :log
# Only use best-standards-support built into browsers
config.action_dispatch.best_standards_support = :builtin
# Raise exception on mass assignment protection for Active Record models
config.active_record.mass_assignment_sanitizer = :strict
# Log the query plan for queries taking more than this (works
# with SQLite, MySQL, and PostgreSQL)
config.active_record.auto_explain_threshold_in_seconds = 0.5
# Do not compress assets
config.assets.compress = false
# Expands the lines which load the assets
config.assets.debug = true
end

View File

@ -7,8 +7,7 @@ Thingspeak::Application.configure do
# and recreated between test runs. Don't rely on the data there!
config.cache_classes = true
# Log error messages when you accidentally call methods on nil.
config.whiny_nils = true
config.eager_load = false
# Show full error reports and disable caching
config.consider_all_requests_local = true
@ -31,12 +30,8 @@ Thingspeak::Application.configure do
# config.active_record.schema_format = :sql
# Print deprecation notices to the stderr
config.active_support.deprecation = :stderr
# Allow pass debug_assets=true as a query parameter to load pages with unpackaged assets
config.assets.allow_debugging = true
# Configure static asset server for tests with Cache-Control for performance
config.active_support.deprecation = :notify
config.serve_static_assets = true
config.static_cache_control = "public, max-age=3600"
end

View File

@ -2,5 +2,28 @@
# set to false to only allow updates via HTTP POST
GET_SUPPORT = true
# rate limit channel updates
RATE_LIMIT = false
# number of seconds to wait before a channel can be updated again
RATE_LIMIT_FREQUENCY = '15'
# main production server to handle all requests (can be a proxy)
APPLICATION_IP_ADDRESS = '127.0.0.1'
# domain for the API
API_DOMAIN = 'http://127.0.0.1:3000/'
# get api key from HTTP headers if this value is present
HTTP_HEADER_API_KEY_NAME = 'THINGSPEAKAPIKEY'
# Twitter api credentials
CONSUMER_KEY = ''
CONSUMER_SECRET = ''
# reset password base url
RESET_PASSWORD_URL = 'http://127.0.0.1:3000//users/reset_password/'
# allow only these additional locales (use downcase, easier to parse)
ALLOWED_LOCALES = ['pt-br','it']
ALLOWED_LOCALES = ['pt-br','it']

View File

@ -4,4 +4,5 @@
# If you change this key, all old signed cookies will become invalid!
# Make sure the secret is at least 30 characters and all random,
# no regular words or you'll be exposed to dictionary attacks.
Thingspeak::Application.config.secret_token = '44a84c8a4b53e95aecc92b38a267eaef3853d876968ad30f0b21023922b9dbaed1976e8a29884121e124720bfe3a13f8b1b0078f94f840866f83fc9bfbd75f73'
Thingspeak::Application.config.secret_key_base = '8dbb2d4ce6ad0f87b886c4bf796b1f8f94268837776ae730f2fa2724ef1643e0eb3d4a814a01512e9e73902ea88d5553e367e321d44522bc802153369ebe4cf9'

View File

@ -0,0 +1,11 @@
#Changing the as_json method to remove the milliseconds from TimeWithZone to_json result (just like in Rails 3)
class ActiveSupport::TimeWithZone
def as_json(options = {})
if ActiveSupport::JSON::Encoding.use_standard_json_time_format
xmlschema
else
%(#{time.strftime("%Y/%m/%d %H:%M:%S")} #{formatted_offset(false)})
end
end
end

View File

@ -7,8 +7,9 @@ en:
formats:
pretty: "%a, %b %e at %l:%M %p"
about: "About"
account: "Account"
account_changes: "Confirm account changes"
account_edit: "Edit Account Information"
account_edit: "Edit Account"
account_error: "There were some problems creating your account:"
account_error_edit: "There were some problems editing your account:"
account_info: "Account Information"
@ -21,6 +22,7 @@ en:
api_key: "API Key"
api_key_delete: "Delete API Key"
api_key_key: "Key"
api_key_new: "Generate New API Key"
api_key_read: "Read API Keys"
api_key_read_new: "Generate New Read API Key"
api_key_write: "Write API Key"
@ -39,6 +41,7 @@ en:
channel_create: "Create New Channel"
channel_edit: "Edit Channel"
channel_error: "There were some problems creating your channel:"
channel_update_success: "The Channel was updated."
channel_feed: "Channel Feed"
channel_default_field: "Field Label"
channel_default_name: "Channel"
@ -47,7 +50,10 @@ en:
channel_description: "Description"
channel_directions: "Directions"
channel_id: "Channel ID"
channel_log_to: "Log to Channel"
channel_logged_to: "Logged to Channel"
channel_name: "Name"
channel_ranking: "Percentage Complete"
channel_not_public: "This channel is not public."
channel_permission: "You don't have permission to view that channel!"
channel_public: "Viewing public channel"
@ -56,9 +62,15 @@ en:
channel_url: "URL"
channels: "Channels"
channels_my: "My Channels"
channels_public: "Public Channels"
channels_public_view: "View Public Channels"
channel_being_cleared: "This channel is currently being cleared. Any data you post to this channel before clearing is complete may be deleted."
channel_video_type_blank: "Either Youtube, or Vimeo, is required if a Video ID is specified."
chart: "Chart"
chart_max: "Max"
chart_min: "Min"
chart_background_color: "Background"
chart_is_dynamic: "Dynamic?"
chart_embed_code: "Embed Code"
chart_example: "Example Chart"
chart_color: "Color"
@ -66,7 +78,7 @@ en:
chart_owned: "Your Charts"
chart_round: "Rounding"
chart_type: "Type"
chart_update: "Update"
chart_update: "Update Chart"
chart_xaxis: "X-Axis"
chart_yaxis: "Y-Axis"
charts: "Charts"
@ -84,9 +96,12 @@ en:
confirm_device_random_mac: "Are you sure you want to generate a random MAC address for this device?"
confirm_device_unique_mac: "Are you sure you want to generate a unique MAC address for this device?"
confirm_new_api_key: "Are you sure you want to generate a new write API key?"
confirm_new_talkback_key: "Are you sure you want to generate a new TalkBack API key?"
confirm_new_thinghttp_key: "Are you sure you want to generate a new ThingHTTP API key?"
confirm_new_thingtweet_key: "Are you sure you want to generate a new ThingTweet API key?"
confirm_new_user_api_key: "Are you sure you want to generate a new API key?"
confirm_plugin_delete: "Are you sure you want to delete this plugin?"
confirm_talkback_delete: "Are you sure you want to delete this TalkBack?"
confirm_thinghttp_delete: "Are you sure you want to delete this ThingHTTP?"
confirm_tweetcontrol_delete: "Are you sure you want to delete this TweetControl?"
confirm_twitter_delete: "Are you sure you want to unlink this Twitter account?"
@ -95,6 +110,8 @@ en:
data: "Data"
days: "Days"
delete: "delete"
developer_info: "Developer Info"
device: "Device"
device_create: "Add New Device"
device_custom_mac: "Enter Custom MAC Address"
device_default_name: "Device"
@ -107,6 +124,7 @@ en:
device_local_ip_address: "Local IP Address"
device_local_port: "Local Port"
device_mac: "MAC Address"
device_mac_invalid: "Invalid MAC Address."
device_model: "Model"
device_port: "Public Port Number"
device_random_mac: "Generate Random MAC Address"
@ -123,11 +141,13 @@ en:
email: "Email"
email_form_add: "Add Email"
featured_channels: "Featured Channels"
selected_channels: "Channels"
features: "Features"
field: "Field"
footer: "This is the footer message."
forgot: "Forgot your password?"
forum: "Forum"
for_more_information: "More Information"
generate_thingtweet_arduino_code: "Generate ThingTweet Arduino Code"
height: "Height"
home: "Home"
@ -140,16 +160,16 @@ en:
median: "Median"
member_since: "Member since"
message_field: "Message Field"
myaccount: "Account"
myaccount: "My Account"
mychannels: "My Channels"
new: "New"
news: "News"
note: "Note"
note_save: "Save Note"
password: "Password"
password_change_raw: "Change<br />Password"
password_change: "Change Password"
password_confirmation: "Password Confirmation"
password_confirmation_raw: "Password<br />Confirmation"
password_current_raw: "Current<br />Password"
password_current: "Current Password"
password_forgot: "Forgot your password?"
password_forgot_message: "Enter your email address below and we'll send you a link where you can reset your password."
password_incorrect: "Your current password was not entered correctly."
@ -178,6 +198,7 @@ en:
plugin_name: "Name"
plugin_permission: "You don't have permission to access this plugin!"
plugins: "Plugins"
plugin_private_flag: "Private?"
profile_bio: "Bio"
profile_edit: "Edit Public Profile"
profile_for: "Profile for"
@ -189,11 +210,73 @@ en:
public: "Make Public?"
public_header: "Public?"
public_profile: "Public Profile"
public_true: "Yes"
public_true: "This channel is public"
questions: "Questions"
react: "React"
react_header_name: "Name"
react_new_button: "Create New React"
react_delete_confirm: "Are you sure you wish to delete this condition?"
react_thinghttp_error: "'%{thinghttp_name}' request doesn't belong to you"
react_channel_error: "'%{channel_name}' request doesn't belong to you"
react_invalid_error: "%{value} is not a valid value"
react_invalid_number_error: "%{value} is not a value field number"
react_invalid_condition_error: "%{value} is not a valid condition"
react_invalid_condition_type_error: "%{value} is not a valid condition type"
react_twitter_account_required: "You need to add a twitter account to enable tweeting"
react_add_twitter_account: "Add a twitter account"
react_thinghttp_required: "You need to add a ThingHTTP request "
react_add_thinghttp_req: "Add ThingHTTP request"
react_tweet_cant_be_blank: "The tweet can't be blank"
react_type_string: "String"
react_type_status: "Status"
react_type_numeric: "Numeric"
react_type_geo: "Geo"
react_type_nodata: "No Data Check"
react_when_insert: "On Data Insertion"
react_when_10m: "Every 10 minutes"
react_when_30m: "Every 30 minutes"
react_when_60m: "Every 60 minutes"
react_condition_prefix: "If channel"
react_condition_field: "field"
react_condition_contains: "contains"
react_condition_begins: "starts with"
react_condition_ends: "ends with"
react_condition_gt: "is greater than"
react_condition_gte: "is greater than or equal to"
react_condition_lt: "is less than"
react_condition_lte: "is less than or equal to"
react_condition_eq: "is equal to"
react_condition_ne: "is not equal to"
react_condition_within: "is within"
react_condition_further: "is further than"
react_condition_nodata_prefix: "has not been updated for"
react_condition_nodata_suffix: "minutes"
react_condition_geo: "km from"
react_latitude: "latitude"
react_longitude: "longitude"
react_delete: "Delete this React"
react_twitter_delete_warning1: "Cannot delete this twitter account as it is used by %{reacts_count}: %{reacts_list}"
react_twitter_delete_warning2: "Please delete or modify this react before unlinking this twitter account."
react_thinghttp_delete_warning1: "Cannot delete this ThingHTTP as it is used by %{reacts_count}: %{reacts_list}"
react_thinghttp_delete_warning2: "Please delete or modify this react before unlinking this ThingHTTP."
react_default_name: "React"
react_label_condition: "Condition"
react_label_test_frequency: "Test Frequency"
react_label_react_name: "React Name"
react_label_condition_type: "Condition Type"
react_label_action: "Action"
react_label_options: "Options"
react_action_tweet_prefix: "then tweet"
react_action_tweet_suffix: "using Twitter account"
react_action_thinghttp_prefix: "then perform ThingHTTP"
react_option_run_first_time: "Run action only the first time the condition is met"
react_option_run_every_time: "Run action each time condition is met"
react_create_button: "Create React"
react_save_button: "Create React"
remember_me: "Remember my User ID"
results: "Results"
rss: "RSS Feed"
save: "Save"
saved: "Saved."
saved_error: "Error while saving data."
search_empty: "No search results were found."
@ -216,10 +299,42 @@ en:
social_channel_error_slug_exists: "Slug is already taken."
social_channel_new: "New Social Channel"
social_saved: "Submitted, thank you!"
status_messages: "Status Messages"
submit: "Submit"
sum: "Sum"
scheduled_thinghttp: "Scheduled ThingHTTP"
scheduled_thinghttp_header_name: "name"
scheduled_thinghttp_new_button: "New Scheduled ThingHTTP"
scheduled_thinghttp_delete_confirm: "Are you sure you wish to delete this scheduled ThingHTTP?"
scheduled_thinghttp_label_name: "Name"
scheduledthinghttp_label_frequency: "Frequency"
scheduled_thinghttp_save_button: "Save Scheduled ThingHTTP"
scheduled_thinghttp_create_button: "Create Scheduled ThingHTTP"
scheduledthinghttp_default_name: "Scheduled ThingHTTP"
scheduled_thinghttp_thinghttp_error: "'%{thinghttp_name}' request doesn't belong to you"
scheduled_thinghttp_channel_error: "'%{channel_name}' channel doesn't belong to you"
scheduled_thinghttp_label_rule: "Rule"
scheduled_thinghttp_field_error: "Not a valid field"
support: "Support"
help_scheduled_thinghttp_edit: ""
tag: "tag"
tags: "Tags"
tags_search: "Search Channels"
talkback: "TalkBack"
talkback_command_add: "Add a new command"
talkback_command_command_string: "Command string"
talkback_command_id: "Command ID"
talkback_command_position: "Position"
talkback_command_remove: "Remove command"
talkback_commands: "Commands"
talkback_create: "New TalkBack"
talkback_delete: "Delete TalkBack"
talkback_delete_message: "Want to delete this TalkBack?"
talkback_edit: "Edit TalkBack"
talkback_id: "TalkBack ID"
talkback_name: "Name"
talkback_new_api_key: "Regenerate API Key"
talkback_update: "Update TalkBack"
thinghttp: "ThingHTTP"
thinghttp_auth_name: "HTTP Auth Username"
thinghttp_auth_pass: "HTTP Auth Password"
@ -256,6 +371,7 @@ en:
tos: "Terms of Service"
tos_agree: "By signing up, you agree to the"
try_again: "Please try again!"
tutorials: "Tutorials"
tweetcontrol: "TweetControl"
tweetcontrol_delete: "Delete TweetControl"
tweetcontrol_delete_message: "Want to delete this TweetControl?"
@ -263,7 +379,7 @@ en:
tweetcontrol_new: "Create New TweetControl"
tweetcontrol_edit: "Update TweetControl"
tweetcontrol_thinghttp: "ThingHTTP Action"
tweetcontrol_trigger: "Hashtag Trigger"
tweetcontrol_trigger: "Trigger"
twitter_accounts: "Current Twitter accounts"
twitter_delete: "Unlink Account"
twitter_failure: "Twitter failure."
@ -271,10 +387,13 @@ en:
twitter_link_account: "Link Twitter Account"
twitter_link_success: "has been successfully linked to ThingTweet."
twitter_new_api_key: "Regenerate API Key"
twitter_screen_name: "Twitter Screen Name"
twitter_screen_name: "Twitter Account"
upload: "Upload"
upload_select: "Upload a CSV file to import data into this channel"
uploading: "uploading file..."
upload_successful: "Upload successful."
upload_no_file: "Please specify a file to be uploaded."
upload_no_data: "The uploaded file was empty."
url: "URL"
user: "User"
user_no_public_channels: "This user has no public channels."
@ -288,16 +407,26 @@ en:
watched_empty: "You aren't watching any channels."
watched_find: "Find some channels to watch."
watched_view: "View Watched Channels"
public_link: "Public"
private_link: "Private"
settings_link: "Settings"
api_key_link: "API Key"
data_import_link: "Data Import"
width: "Width"
youtube: "YouTube"
# help section
help: "Help"
help_api_documentation: "API documentation"
help_apps_talkback: "Allow devices to execute queued commands."
help_apps_thinghttp: "Create custom POSTs or GETs to other webservices and retrieve the data."
help_apps_thingtweet: "Link your Twitter account to ThingSpeak and send Twitter messages using our simple API."
help_apps_tweetcontrol: "Listen to commands from Twitter and then perform an action."
help_apps_react: "Perform actions when conditions are met by your data in your channels."
help_channel: "Create a channel -- it can be for a device, app, or anything that can send data to ThingSpeak."
help_channel_clear: "Clicking on the \"Clear Channel\" button will delete ALL feed data associated with this channel, but will leave the channel's info intact."
help_channel_ranking: "Completeness will help your channel appear higher in the list of public channels."
help_channel_feed: "Viewing Data"
help_channel_fields: "Add up to 8 fields that can be tracked. A field must be added before it can store data."
help_channel_import: "Select a CSV file on your hard drive and import all of its data directly into this channel. Your CSV file should contain a date field in the first column. If your data doesn't contain timezone info, select one appropriately."
@ -320,13 +449,225 @@ en:
help_plugins: "Plugins allow you to create custom HTML, JavaScript, and CSS files that can be used to parse and display your data."
help_social_channel: "Create a new social channel which will be accessible at:"
help_social_channel_public: "All social channels are public. Use the Message Field to allow users to enter other data, such as a message to go along with their submission."
help_talkback: "Send queued commands to your devices with TalkBack."
help_talkback_index: "Create a TalkBack and add some commands. Your device can then execute the stored commands, and those commands will be removed from the queue."
help_talkback_channel: "If a channel log is set, executed commands will be automatically logged to the 'status' field of that channel."
help_talkback_commands_1: "Commands can be added here or"
help_talkback_commands_2: "via the API"
help_talkback_show: "To learn more about using TalkBack, we suggest checking out our"
help_thinghttp: "Use ThingHTTP to access other APIs or webpages and parse the responses. You can create and save a full HTTP request to any URL, and then easily access it by using your ThingHTTP API key."
help_thinghttp_edit: "Create your custom HTTP request on this page. For example, try the following options:"
help_thinghttp_example: "This will send your HTTP GET request to Google Finance and parse the response for an element having an ID of ref_626307_c, which corresponds to the S&P 500 current price change for the day."
help_thinghttp_show: "You can now send your ThingHTTP request and view the response using the following URL:"
help_thingtweet: "ThingTweet acts as a proxy to Twitter so that your devices can update Twitter statuses without having to implement Open Authentication (OAuth)."
help_tweetcontrol: "Use TweetControl to listen to specific hashtags from Twitter, and then perform customized actions."
help_tweetcontrol_edit: "Fill in the Twitter screen name and a hashtag to listen for."
help_tweetcontrol_hashtag: "The hashtag #thingspeak must also be present in the Twitter status, for example:"
help_tweetcontrol_thinghttp: "Select a ThingHTTP request to use with this TweetControl. The ThingHTTP request will be executed when the TweetControl is triggered."
help_tweetcontrol: "Use TweetControl to listen to specific trigger words from Twitter, and then process a ThingHTTP request."
help_tweetcontrol_edit: "Select Anonymous TweetControl to allow anyone to trigger your TweetControl or fill in a specfic Twitter Account."
help_tweetcontrol_hashtag: "To trigger a TweetControl, you need to send a Twitter Status Update with at least the hashtag #thingspeak and the trigger word, for example:"
help_tweetcontrol_thinghttp: "Select a ThingHTTP request to use with this TweetControl. The ThingHTTP request will be executed when the TweetControl is triggered."
help_tweetcontrol_trigger: "Fill in a trigger to listen for."
help_options: "more help"
help_react: "React allow you to trigger a ThingHTTP request or send a tweet using ThingTweet when your ThingSpeak Channel meets a certain condition. "
help_react_create: "Create your React condition here."
help_react_edit: "Update your React condition here."
help_react_edit1: "Select a condition type to correspond with the type of data you wish to check and set your condition values."
help_react_edit2: "Use the Test Frequency setting to choose to test your condition on every insert or on a periodic basis."
help_react_edit3: "Select ThingTweet or ThingHTTP as the action to be performed if the condition is met."
# unsorted
window_map: "Channel Location"
window_status: "Channel Status Updates"
window_channel_video: "Channel Video"
window_field_chart: "Field %{field_number} Chart"
window_plugin: "%{name} (Plugin)"
portlets_available: "Available Windows"
private_view: "Private View"
public_view: "Public View"
channel_settings: "Channel Settings"
data_import: "Data Import"
portlets_all_displayed: "All available windows are being displayed"
portlets_add: "Click a rectangle to add that windows to the dashboard"
add_portlets: "Add Windows"
# documentation error headers
error_code: "Error Code"
error_http_status: "HTTP Status"
error_message: "Message"
error_details: "Details"
# errors
error_codes:
error_auth_required:
message: "Authorization Required"
http_status: 401
details: "Please make sure that your API key is correct."
error_resource_not_found:
message: "Resource Not Found"
http_status: 404
details: "The requested resource was not found. Please check the URL and try again."
error_method_invalid:
message: "Method Not Allowed"
http_status: 405
details: "Please use the proper HTTP method for this request."
error_no_action:
message: "No Action Performed"
http_status: 421
details: "The server attempted to process your request, but has no action to perform."
error_too_many_requests:
message: "Too Many Requests"
http_status: 429
details: "Please wait before making another request."
number:
# Used in number_with_delimiter()
# These are also the defaults for 'currency', 'percentage', 'precision', and 'human'
format:
# Sets the separator between the units, for more precision (e.g. 1.0 / 2.0 == 0.5)
separator: "."
# Delimits thousands (e.g. 1,000,000 is a million) (always in groups of three)
delimiter: ","
# Number of decimals, behind the separator (the number 1 with a precision of 2 gives: 1.00)
precision: 3
# If set to true, precision will mean the number of significant digits instead
# of the number of decimal digits (1234 with precision 2 becomes 1200, 1.23543 becomes 1.2)
significant: false
# If set, the zeros after the decimal separator will always be stripped (eg.: 1.200 will be 1.2)
strip_insignificant_zeros: false
# Used in number_to_currency()
currency:
format:
# Where is the currency sign? %u is the currency unit, %n the number (default: $5.00)
format: "%u%n"
unit: "$"
# These five are to override number.format and are optional
separator: "."
delimiter: ","
precision: 2
significant: false
strip_insignificant_zeros: false
# Used in number_to_percentage()
percentage:
format:
# These five are to override number.format and are optional
# separator:
delimiter: ""
# precision:
# significant: false
# strip_insignificant_zeros: false
format: "%n%"
# Used in number_to_precision()
precision:
format:
# These five are to override number.format and are optional
# separator:
delimiter: ""
# precision:
# significant: false
# strip_insignificant_zeros: false
# Used in number_to_human_size() and number_to_human()
human:
format:
# These five are to override number.format and are optional
# separator:
delimiter: ""
precision: 3
significant: true
strip_insignificant_zeros: true
# Used in number_to_human_size()
storage_units:
# Storage units output formatting.
# %u is the storage unit, %n is the number (default: 2 MB)
format: "%n %u"
units:
byte:
one: "Byte"
other: "Bytes"
kb: "KB"
mb: "MB"
gb: "GB"
tb: "TB"
# Used in number_to_human()
decimal_units:
format: "%n %u"
# Decimal units output formatting
# By default we will only quantify some of the exponents
# but the commented ones might be defined or overridden
# by the user.
units:
# femto: Quadrillionth
# pico: Trillionth
# nano: Billionth
# micro: Millionth
# mili: Thousandth
# centi: Hundredth
# deci: Tenth
unit: ""
# ten:
# one: Ten
# other: Tens
# hundred: Hundred
thousand: Thousand
million: Million
billion: Billion
trillion: Trillion
quadrillion: Quadrillion
# Used in distance_of_time_in_words(), distance_of_time_in_words_to_now(), time_ago_in_words()
datetime:
distance_in_words:
half_a_minute: "half a minute"
less_than_x_seconds:
one: "less than 1 second"
other: "less than %{count} seconds"
x_seconds:
one: "1 second"
other: "%{count} seconds"
less_than_x_minutes:
one: "less than a minute"
other: "less than %{count} minutes"
x_minutes:
one: "1 minute"
other: "%{count} minutes"
about_x_hours:
one: "about 1 hour"
other: "about %{count} hours"
x_days:
one: "1 day"
other: "%{count} days"
about_x_months:
one: "about 1 month"
other: "about %{count} months"
x_months:
one: "1 month"
other: "%{count} months"
about_x_years:
one: "about 1 year"
other: "about %{count} years"
over_x_years:
one: "over 1 year"
other: "over %{count} years"
almost_x_years:
one: "almost 1 year"
other: "almost %{count} years"
prompts:
year: "Year"
month: "Month"
day: "Day"
hour: "Hour"
minute: "Minute"
second: "Seconds"
helpers:
select:
# Default value for :prompt => true in FormOptionsHelper
prompt: "Please select"
# Default translation keys for submit and button FormHelper
submit:
create: 'Create %{model}'
update: 'Update %{model}'
submit: 'Save %{model}'

View File

@ -365,6 +365,11 @@ it:
watched_empty: "Non sta guardando alcun canale."
watched_find: "Trova qualche canale da guardare."
watched_view: "Visualizza i Canali Visti"
public_link: "Public"
private_link: "Private"
settings_link: "Settings"
api_key_link: "API Key"
data_import_link: "Data Import"
width: "Larghezza"
youtube: "YouTube"
@ -413,7 +418,7 @@ it:
help_react: "React allow you to trigger a ThingHTTP request or send a tweet using ThingTweet when your ThingSpeak Channel meets a certain condition. "
help_react_create: "Create your React condition here."
help_react_edit: "Update your React condition here."
help_react_edit1: "Select a condtion type to corespond with the type of data you wish to check and set your condition values."
help_react_edit1: "Select a condition type to correspond with the type of data you wish to check and set your condition values."
help_react_edit2: "Use the Test Frequency setting to choose to test your condition on every insert or on a periodic basis."
help_react_edit3: "Select ThingTweet or ThingHTTP as the action to be performed if the condition is met."
window_map: "Mappa"
@ -582,4 +587,4 @@ it:
submit:
create: 'Create %{model}'
update: 'Update %{model}'
submit: 'Save %{model}'
submit: 'Save %{model}'

View File

@ -39,6 +39,7 @@
channel_create: "Criar novo canal"
channel_edit: "Editar Canal"
channel_error: "Ocorreram alguns problemas ao criar seu canal:"
channel_update_success: "The Channel was updated."
channel_feed: "Dados do Canal"
channel_default_field: "Rótulo do campo"
channel_default_name: "Canal"
@ -48,7 +49,8 @@
channel_directions: "Direções"
channel_id: "ID do canal"
channel_name: "Nome"
channel_not_public: "Este canal é público."
channel_ranking: "Percentage Complete"
channel_not_public: "Este canal não é público."
channel_permission: "Você não tem permissão para visualizar este canal!"
channel_public: "Visualizar canal público"
channel_public_view: "Visualização Pública"
@ -57,7 +59,12 @@
channels: "Canais"
channels_my: "Meus Canais"
channels_public_view: "Visualizar canais públicos"
channel_being_cleared: "This channel is currently being cleared. Any data you post to this channel before clearing is complete may be deleted."
channel_video_type_blank: "Ou Youtube, ou Vimeo, é necessário se Video ID é especificado."
chart: "Gráfico"
chart_max: "Máximo"
chart_min: "Mínimo"
chart_is_dynamic: "Dinâmico"
chart_background_color: "Cor do fundo"
chart_embed_code: "Código para embutir"
chart_example: "Gráfico de exemplo"
@ -66,7 +73,7 @@
chart_owned: "Seus gráficos"
chart_round: "Arredondamento"
chart_type: "Tipo"
chart_update: "Atualizar"
chart_update: "Atualizar gráficos"
chart_xaxis: "Eixo X"
chart_yaxis: "Eixo Y"
charts: "Gráficos"
@ -95,6 +102,7 @@
data: "Dados"
days: "Dias"
delete: "apagar"
device: "Device"
device_create: "Adicionar um novo dispositivo"
device_custom_mac: "Digitar um endereço MAC personalizado"
device_default_name: "Dispositivo"
@ -107,6 +115,7 @@
device_local_ip_address: "Endereço IP Local"
device_local_port: "Porta Local"
device_mac: "Endereço MAC"
device_mac_invalid: "Invalid MAC Address."
device_model: "Modelo"
device_port: "Número da porta pública"
device_random_mac: "Gerar endereço MAC aleatório"
@ -128,6 +137,7 @@
footer: "Esta é a mensagem de rodapé."
forgot: "Esqueceu sua senha?"
forum: "Fórum"
for_more_information: "Para Mais Informações"
generate_thingtweet_arduino_code: "Gerar código Arduino para o ThingTweet"
height: "Altura"
home: "Início"
@ -177,7 +187,9 @@
plugin_js: "JavaScript"
plugin_name: "Nome"
plugin_permission: "Você não tem permissão para apagar isto!"
plugin_private_flag: "Private only?"
plugins: "Plugins"
plugin_private_flag: "Private?"
profile_bio: "Biografia"
profile_edit: "Editar perfil público"
profile_for: "Perfil de"
@ -189,8 +201,69 @@
public: "Tornar Público?"
public_header: "Público?"
public_profile: "Perfil Público"
public_true: "Sim"
public_true: "Este canal é público."
questions: "Perguntas"
react: "React"
react_header_name: "Name"
react_new_button: "Create New React"
react_delete_confirm: "Are you sure you wish to delete this condition?"
react_thinghttp_error: "'%{thinghttp_name}' request doesn't belong to you"
react_channel_error: "'%{channel_name}' request doesn't belong to you"
react_invalid_error: "%{value} is not a valid value"
react_invalid_number_error: "%{value} is not a value field number"
react_invalid_condition_error: "%{value} is not a valid condition"
react_invalid_condition_type_error: "%{value} is not a valid condition type"
react_twitter_account_required: "You need to add a twitter account to enable tweeting"
react_add_twitter_account: "Add a twitter account"
react_thinghttp_required: "You need to add a ThingHTTP request "
react_add_thinghttp_req: "Add ThingHTTP request"
react_tweet_cant_be_blank: "The tweet can't be blank"
react_type_string: "String"
react_type_status: "Status"
react_type_numeric: "Numeric"
react_type_geo: "Geo"
react_type_nodata: "No Data Check"
react_when_insert: "On Data Insertion"
react_when_10m: "Every 10 minutes"
react_when_30m: "Every 30 minutes"
react_when_60m: "Every 60 minutes"
react_condition_prefix: "If channel"
react_condition_field: "field"
react_condition_contains: "contains"
react_condition_begins: "starts with"
react_condition_ends: "ends with"
react_condition_gt: "is greater than"
react_condition_gte: "is greater than or equal to"
react_condition_lt: "is less than"
react_condition_lte: "is less than or equal to"
react_condition_eq: "is equal to"
react_condition_ne: "is not equal to"
react_condition_within: "is within"
react_condition_further: "is further than"
react_condition_nodata_prefix: "has not been updated for"
react_condition_nodata_suffix: "minutes"
react_condition_geo: "km from"
react_latitude: "latitude"
react_longitude: "longitude"
react_delete: "Delete this React"
react_twitter_delete_warning1: "Cannot delete this twitter account as it is used by %{reacts_count}: %{reacts_list}"
react_twitter_delete_warning2: "Please delete or modify this react before unlinking this twitter account."
react_thinghttp_delete_warning1: "Cannot delete this ThingHTTP as it is used by %{reacts_count}: %{reacts_list}"
react_thinghttp_delete_warning2: "Please delete or modify this react before unlinking this ThingHTTP."
react_default_name: "React"
react_label_condition: "Condition"
react_label_test_frequency: "Test Frequency"
react_label_react_name: "React Name"
react_label_condition_type: "Condition Type"
react_label_action: "Action"
react_label_options: "Options"
react_action_tweet_prefix: "then tweet"
react_action_tweet_suffix: "using Twitter account"
react_action_thinghttp_prefix: "then perform thinghttp"
react_option_run_first_time: "Run action only the first time the condition is met"
react_option_run_every_time: "Run action each time condition is met"
react_create_button: "Create React"
react_save_button: "Create React"
remember_me: "Lembrar meu Login"
results: "Resultados"
rss: "RSS Feed"
@ -216,6 +289,7 @@
social_channel_error_slug_exists: "Slug já foi usado."
social_channel_new: "Novo canal social"
social_saved: "Enviado, obrigado!"
status_messages: "Status Messages"
submit: "Enviar"
sum: "Soma"
tags: "Tags"
@ -275,6 +349,9 @@
upload: "Upload"
upload_select: "Faça o upload de um arquivo CSV para importar dados para este canal"
uploading: "fazendo upload..."
upload_successful: "Upload successful."
upload_no_file: "Please specify a file to be uploaded."
upload_no_data: "The uploaded file was empty."
url: "URL"
user: "Login"
user_no_public_channels: "Este usuário não possui canais públicos."
@ -288,6 +365,11 @@
watched_empty: "Você não está monitorando nenhum canal."
watched_find: "Encontrar algum canal para monitorar."
watched_view: "Ver canais monitorados"
public_link: "Públicos"
private_link: "Private"
settings_link: "Settings"
api_key_link: "API Key"
data_import_link: "Data Import"
width: "Largura"
youtube: "YouTube"
@ -296,8 +378,10 @@
help_apps_thinghttp: "Crie POSTs ou GETs personalizados para outros webservices e receba os dados."
help_apps_thingtweet: "Conecte sua conta do Twitter ao ThingSpeak e envie mensagens para o Twitter usando nossa API."
help_apps_tweetcontrol: "Receba comandos via Twitter e execute ações."
help_apps_react: "Perform actions when conditions are met by your data in your channels."
help_channel: "Crie um canal, pode ser para um dispositivo, aplicação ou qualquer outra coisa que envie dados para o ThingSpeak."
help_channel_clear: "Clicando em \"Limpar Canal\" todos os registros recebidos por este canal serão apagados, porém as informações do canal permanecerão intactas."
help_channel_ranking: "Completeness will help your channel appear higher in the list of public channels."
help_channel_feed: "Como ver os dados enviados"
help_channel_fields: "Adiciona até 8 campos de registro. Você deve adicionar um campo antes de armazenar os dados."
help_channel_import: "Seleciona um arquivo CSV do seu disco rígido e importe todos os dados diretamente para este canal. Seu arquivo CSV deve conter, no primeiro campo, a data do registro. Se seus dados não contém a zona horária, selecione o timezone correto."
@ -326,7 +410,182 @@
help_thinghttp_show: "Você pode enviar sua chamada via ThingHTTP com a seguinte URL:"
help_thingtweet: "ThingTweet atua como um proxy para o Twitter. Assim seus dispositivos podem atualizar o status do Twitter sem precisar implementar o Open Authentication (OAuth)."
help_tweetcontrol: "Use o TweetControl para monitorar hashtags específicas do Twitter, e então realizar ações personalizadas."
help_tweetcontrol_edit: "Preencha o login do Twitter e a hashtag que você deseja monitorar."
help_tweetcontrol_edit: "Preencha o login do Twitter."
help_tweetcontrol_hashtag: "A hashtag #thingspeak deve estar presente no status do Twitter, por exemplo:"
help_tweetcontrol_thinghttp: "Selecione uma chamada ThingHTTP para ser usada por este TweetControl. A chamada ThingHTTP será executada quando o TweetControl for disparado."
help_tweetcontrol_trigger: "Preencha a hashtag que você deseja monitorar."
help_options: "mais ajuda"
help_react: "React allow you to trigger a ThingHTTP request or send a tweet using ThingTweet when your ThingSpeak Channel meets a certain condition. "
help_react_create: "Create your React condition here."
help_react_edit: "Update your React condition here."
help_react_edit1: "Select a condition type to correspond with the type of data you wish to check and set your condition values."
help_react_edit2: "Use the Test Frequency setting to choose to test your condition on every insert or on a periodic basis."
help_react_edit3: "Select ThingTweet or ThingHTTP as the action to be performed if the condition is met."
window_map: "Channel Location"
window_status: "Channel Status Updates"
window_channel_video: "Channel Video"
window_field_chart: "Field Chart"
window_plugin: "%{name} (Plugin)"
portlets_available: "Available Portlets"
private_view: "Private View"
public_view: "Public View"
channel_settings: "Channel Settings"
data_import: "Data Import"
portlets_all_displayed: "All available portlets are being displayed"
portlets_add: "Click a rectangle to add that portlet to the dashboard"
add_portlets: "Add Windows"
number:
# Used in number_with_delimiter()
# These are also the defaults for 'currency', 'percentage', 'precision', and 'human'
format:
# Sets the separator between the units, for more precision (e.g. 1.0 / 2.0 == 0.5)
separator: "."
# Delimits thousands (e.g. 1,000,000 is a million) (always in groups of three)
delimiter: ","
# Number of decimals, behind the separator (the number 1 with a precision of 2 gives: 1.00)
precision: 3
# If set to true, precision will mean the number of significant digits instead
# of the number of decimal digits (1234 with precision 2 becomes 1200, 1.23543 becomes 1.2)
significant: false
# If set, the zeros after the decimal separator will always be stripped (eg.: 1.200 will be 1.2)
strip_insignificant_zeros: false
# Used in number_to_currency()
currency:
format:
# Where is the currency sign? %u is the currency unit, %n the number (default: $5.00)
format: "%u%n"
unit: "$"
# These five are to override number.format and are optional
separator: "."
delimiter: ","
precision: 2
significant: false
strip_insignificant_zeros: false
# Used in number_to_percentage()
percentage:
format:
# These five are to override number.format and are optional
# separator:
delimiter: ""
# precision:
# significant: false
# strip_insignificant_zeros: false
format: "%n%"
# Used in number_to_precision()
precision:
format:
# These five are to override number.format and are optional
# separator:
delimiter: ""
# precision:
# significant: false
# strip_insignificant_zeros: false
# Used in number_to_human_size() and number_to_human()
human:
format:
# These five are to override number.format and are optional
# separator:
delimiter: ""
precision: 3
significant: true
strip_insignificant_zeros: true
# Used in number_to_human_size()
storage_units:
# Storage units output formatting.
# %u is the storage unit, %n is the number (default: 2 MB)
format: "%n %u"
units:
byte:
one: "Byte"
other: "Bytes"
kb: "KB"
mb: "MB"
gb: "GB"
tb: "TB"
# Used in number_to_human()
decimal_units:
format: "%n %u"
# Decimal units output formatting
# By default we will only quantify some of the exponents
# but the commented ones might be defined or overridden
# by the user.
units:
# femto: Quadrillionth
# pico: Trillionth
# nano: Billionth
# micro: Millionth
# mili: Thousandth
# centi: Hundredth
# deci: Tenth
unit: ""
# ten:
# one: Ten
# other: Tens
# hundred: Hundred
thousand: Thousand
million: Million
billion: Billion
trillion: Trillion
quadrillion: Quadrillion
# Used in distance_of_time_in_words(), distance_of_time_in_words_to_now(), time_ago_in_words()
datetime:
distance_in_words:
half_a_minute: "half a minute"
less_than_x_seconds:
one: "less than 1 second"
other: "less than %{count} seconds"
x_seconds:
one: "1 second"
other: "%{count} seconds"
less_than_x_minutes:
one: "less than a minute"
other: "less than %{count} minutes"
x_minutes:
one: "1 minute"
other: "%{count} minutes"
about_x_hours:
one: "about 1 hour"
other: "about %{count} hours"
x_days:
one: "1 day"
other: "%{count} days"
about_x_months:
one: "about 1 month"
other: "about %{count} months"
x_months:
one: "1 month"
other: "%{count} months"
about_x_years:
one: "about 1 year"
other: "about %{count} years"
over_x_years:
one: "over 1 year"
other: "over %{count} years"
almost_x_years:
one: "almost 1 year"
other: "almost %{count} years"
prompts:
year: "Year"
month: "Month"
day: "Day"
hour: "Hour"
minute: "Minute"
second: "Seconds"
helpers:
select:
# Default value for :prompt => true in FormOptionsHelper
prompt: "Please select"
# Default translation keys for submit and button FormHelper
submit:
create: 'Create %{model}'
update: 'Update %{model}'
submit: 'Save %{model}'

View File

@ -1,52 +1,204 @@
Thingspeak::Application.routes.draw do
# main data posts using this route
match 'update', :to => 'channels#post_data', :as => 'update', :via => ((GET_SUPPORT) ? ['get', 'post'] : 'post')
match 'update', :to => 'channels#post_data', :via => ((GET_SUPPORT) ? [:get, :post] : :post)
match 's/update', :to => 'channels#post_data', :via => [:get, :post]
# handle subdomain routes
match '/', :to => 'subdomains#index', :constraints => { :subdomain => 'api' }
match 'crossdomain', :to => 'subdomains#crossdomain', :constraints => { :subdomain => 'api' }
match 'crossdomain', :to => 'subdomains#crossdomain'
get '/', :to => 'subdomains#index', :constraints => { :subdomain => 'api' }
get 'crossdomain', :to => 'subdomains#crossdomain', :constraints => { :subdomain => 'api' }
root :to => 'pages#home'
resource :user_session
resource 'account', :to => 'users'
resources :users do
member do
get :reset_password
put :change_password
end
resource :pages do
collection do
get :forgot_password
get :home
get :features
get :about
get :headers
get :social_home
end
end
match 'users/reset_password/:id', :to => 'users#reset_password', :as => 'reset_password', :via => [:get, :post]
patch 'users/change_password/:id', :to => 'users#change_password'
post 'mailer/resetpassword', :to => 'mailer#resetpassword'
# public user profiles
match 'account/edit_profile' => 'users#edit_profile', :as => 'edit_profile', :via => [:get, :post]
patch 'account/update_profile' => 'users#update_profile', :as => 'update_profile'
# users paths
post 'users/new_api_key' => 'users#new_api_key', :as => 'user_new_api_key'
get 'users/:id/channels(.:format)' => 'users#list_channels', :as => 'list_channels', :constraints => { :id => /.*/ }
get 'users/:glob' => 'users#profile', :as => 'user_profile', :constraints => { :glob => /.*/ }
resource :user_session
resource 'account', :to => 'users'
resources :users
# social channels
get 's/' => 'pages#social_home'
get 's/:slug' => 'channels#social_show', :constraints => { :slug => /.*/ }
get 'channels/social_new' => 'channels#social_new'
# search
resources :tags
# specific feeds
match 'channels/:channel_id/feed(s)(.:format)' => 'feed#index'
match 'channels/:channel_id/field(s)/:field_id(.:format)' => 'feed#index'
match 'channels/:channel_id/field(s)/:field_id/:id(.:format)' => 'feed#show'
match 'channels/:channel_id/feed(s)/entry/:id(.:format)' => 'feed#show'
get 'channels/:channel_id/feed(s)(.:format)' => 'feed#index'
get 'channels/:channel_id/field(s)/:field_id(.:format)' => 'feed#index'
get 'channels/:channel_id/field(s)/:field_id/:id(.:format)' => 'feed#show'
get 'channels/:channel_id/feed(s)/last_average(.:format)' => 'feed#last_average'
get 'channels/:channel_id/feed(s)/last_median(.:format)' => 'feed#last_median'
get 'channels/:channel_id/feed(s)/last_sum(.:format)' => 'feed#last_sum'
get 'channels/:channel_id/feed/entry/:id(.:format)' => 'feed#show' # not sure why this doesn't work with (s)
get 'channels/:channel_id/feeds/entry/:id(.:format)' => 'feed#show' # not sure why this doesn't work with (s)
get 'channels/:channel_id/social_feed' => 'channels#social_feed'
get 'channels/:channel_id/feed(s)/debug' => 'feed#debug'
# import
match 'channels/:channel_id/import' => 'channels#import', :as => 'channel_import'
match 'channels/:channel_id/upload' => 'channels#upload'
# maps
get 'channels/:channel_id/maps/channel_show' => 'maps#channel_show'
get 'channels/:channel_id/status/recent' => 'status#recent'
# nest feeds into channels
# nest the following controllers inside channels
resources :channels do
collection do
get :public
get :watched
end
member do
get :import
post :upload
post :clear
put :watch
end
resources :feed
resources :feeds, :to => 'feed'
resources :api_keys, :except => [:show, :edit]
resources :status
resources :statuses, :to => 'statuses'
resources :statuses, :to => 'status'
resources :charts
resources :maps
resources :channels
resources :tags
resources :comments
resources :windows, :only => [:index, :update] do
member do
get :iframe
get :html
put :hide
put :display
end
end
end
match 'login' => 'user_sessions#new', :as => :login, :via => :get
match 'logout' => 'user_sessions#destroy', :as => :logout, :via => :delete
match 'mailer/resetpassword', :to => 'mailer#resetpassword', :as => :resetpassword, :via => :post
get 'channels/:channel_id/private_windows' => 'windows#private_windows'
get 'channels/:channel_id/hidden_windows' => 'windows#hidden_windows'
match 'channels/:channel_id/windows' => 'windows#update', :via => [:post, :put]
resources :comments do
member do
post :vote
end
end
resources :plugins do
collection do
get 'private_plugins'
get 'public_plugins'
end
end
resources :devices do
member do
get :thingtweet_arduino_code
get :thingtweet_arduino_select_thingtweet
post :add_mac_address
put :ajax_update
end
end
resources :pipes
# twitter status update (version 1)
match 'apps/thingtweet/1/statuses/update(.:format)' => 'thingtweets#update', :via => [:get, :post]
match 'apps/thingtweet/1/statuses/update_debug(.:format)' => 'thingtweets#update_debug', :via => [:get, :post]
# thinghttp action
match 'apps/thinghttp/send_request' => 'thinghttp#send_request', :via => [:get, :post]
# process responses for tweetcontrol
match 'apps/tweetcontrol/process_response' => 'tweetcontrol#process_response', :via => [:get, :post]
# apps and nested controllers
scope 'apps' do
resources :thingtweets do
collection do
get :authorize_response
end
member do
put :new_api_key
end
end
resources :thinghttp do
resources :header
member do
put :new_api_key
end
end
resources :talkbacks do
member do
put :new_api_key
end
end
resources :tweetcontrol
resources :reacts
resources :scheduled_thinghttps
end
# talkback api
delete 'talkbacks/:id/commands', :to => 'commands#destroy_all'
delete 'talkbacks/:id/commands/destroy_all', :to => 'commands#destroy_all'
resources :talkbacks do
resources :commands do
collection do
match :execute, :via => [:post, :get]
delete :destroy_all
end
end
end
resources :apps, :only => ['index']
get 'admin', :to => 'admin#index', :as => 'admin'
namespace :admin do
resources :users
resources :channels
resources :twitter_accounts
resources :thinghttps
resources :devices
resources :failedlogins
resources :emails
end
# app shortcuts
get 'apps/thingtweet', :to => 'thingtweets#index'
get 'apps/react', :to => 'react#index'
# docs
get 'docs(/:action)', :to => 'docs'
# users
match 'login' => 'user_sessions#new', :as => :login, :via => [:get, :post]
match 'logout' => 'user_sessions#destroy', :as => :logout, :via => [:get, :post]
match 'forgot_password', :to => 'users#forgot_password', :as => 'forgot_password', :via => [:get, :post]
# add support for CORS preflighting (matches any OPTIONS route up to 4 levels deep)
# examples: /talkbacks, /talkbacks/4, /talkbacks/4/commands, /talkbacks/4/commands/6
match '/:foo(/:foo(/:foo)(/:foo))', :to => 'cors#preflight', :via => 'options'
#match ':controller(/:action(/:id(.:format)))', :via => :all
end