copycat 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -22,7 +22,7 @@ In a view, use the Rails i18N.translate() method where you would like to display
22
22
  <h1><%= t('site.index.header') %></h1>
23
23
  ```
24
24
 
25
- Visit the page in your browser, and a Copycat translation will be created for the key. Then visit '/copycat_translations' in your browser, log in with the username and password generated in `config/initializers/copycat.rb`, and you can edit the value of that token.
25
+ Visit the page in your browser, and a Copycat translation will be created for the key. Then visit `/copycat_translations` in your browser, log in with the username and password generated in `config/initializers/copycat.rb`, and you can edit the value of that token.
26
26
 
27
27
  ## Rails i18N API ##
28
28
 
@@ -43,7 +43,7 @@ class CopycatTranslationsController < ActionController::Base
43
43
  def upload
44
44
  begin
45
45
  CopycatTranslation.import_yaml(params["file"].tempfile)
46
- rescue StandardError => e
46
+ rescue Exception => e
47
47
  logger.info "\n#{e.class}\n#{e.message}"
48
48
  flash[:notice] = "There was an error processing your upload!"
49
49
  render :action => 'import_export', :status => 400
@@ -1,3 +1,3 @@
1
1
  module Copycat
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
@@ -1,2 +1,2 @@
1
- COPYCAT_USERNAME = "7abb807"
2
- COPYCAT_PASSWORD = "e9ae6da"
1
+ COPYCAT_USERNAME = "username"
2
+ COPYCAT_PASSWORD = "password"
Binary file
@@ -1147,3 +1147,93 @@ Completed 200 OK in 4ms (Views: 2.9ms | ActiveRecord: 0.1ms)
1147
1147
 
1148
1148
  Started GET "/assets/copycat_engine.css?body=1" for 127.0.0.1 at 2012-03-23 12:28:48 -0400
1149
1149
  Served asset /copycat_engine.css - 304 Not Modified (0ms)
1150
+
1151
+
1152
+ Started GET "/" for 127.0.0.1 at 2012-03-26 15:11:35 -0400
1153
+ Processing by SiteController#index as HTML
1154
+ CopycatTranslation Load (1.0ms) SELECT "copycat_translations".* FROM "copycat_translations" WHERE "copycat_translations"."locale" = 'en' AND "copycat_translations"."key" = 'site.index.header' LIMIT 1
1155
+ CopycatTranslation Load (0.1ms) SELECT "copycat_translations".* FROM "copycat_translations" WHERE "copycat_translations"."locale" = 'en' AND "copycat_translations"."key" = 'site.index.intro' LIMIT 1
1156
+  (0.1ms) begin transaction
1157
+ SQL (3.4ms) INSERT INTO "copycat_translations" ("created_at", "key", "locale", "updated_at", "value") VALUES (?, ?, ?, ?, ?) [["created_at", Mon, 26 Mar 2012 19:11:35 UTC +00:00], ["key", "site.index.intro"], ["locale", :en], ["updated_at", Mon, 26 Mar 2012 19:11:35 UTC +00:00], ["value", nil]]
1158
+  (1.0ms) commit transaction
1159
+ Rendered site/index.html.erb within layouts/application (71.2ms)
1160
+ Completed 200 OK in 86ms (Views: 77.5ms | ActiveRecord: 8.0ms)
1161
+
1162
+
1163
+ Started GET "/assets/application.css?body=1" for 127.0.0.1 at 2012-03-26 15:11:35 -0400
1164
+ Served asset /application.css - 200 OK (1ms)
1165
+
1166
+
1167
+ Started GET "/copycat_translations" for 127.0.0.1 at 2012-03-26 15:11:47 -0400
1168
+ Processing by CopycatTranslationsController#index as HTML
1169
+ Filter chain halted as #<Proc:0x0000010157f010@/Users/sjm/.rvm/gems/ruby-1.9.3-p125@copycat/gems/actionpack-3.2.2/lib/action_controller/metal/http_authentication.rb:112> rendered or redirected
1170
+ Completed 401 Unauthorized in 0ms (ActiveRecord: 0.0ms)
1171
+
1172
+
1173
+ Started GET "/copycat_translations" for 127.0.0.1 at 2012-03-26 15:12:29 -0400
1174
+ Processing by CopycatTranslationsController#index as HTML
1175
+ Filter chain halted as #<Proc:0x00000103377180@/Users/sjm/.rvm/gems/ruby-1.9.3-p125@copycat/gems/actionpack-3.2.2/lib/action_controller/metal/http_authentication.rb:112> rendered or redirected
1176
+ Completed 401 Unauthorized in 0ms (ActiveRecord: 0.0ms)
1177
+
1178
+
1179
+ Started GET "/copycat_translations" for 127.0.0.1 at 2012-03-26 15:12:33 -0400
1180
+ Processing by CopycatTranslationsController#index as HTML
1181
+ CopycatTranslation Load (0.1ms) SELECT distinct locale FROM "copycat_translations" 
1182
+ Rendered /vermonster/copycat/app/views/copycat_translations/index.html.erb within layouts/copycat (20.1ms)
1183
+ Completed 200 OK in 49ms (Views: 36.5ms | ActiveRecord: 0.1ms)
1184
+
1185
+
1186
+ Started GET "/assets/copycat_engine.css?body=1" for 127.0.0.1 at 2012-03-26 15:12:33 -0400
1187
+ Served asset /copycat_engine.css - 304 Not Modified (1ms)
1188
+
1189
+
1190
+ Started GET "/copycat_translations/import_export" for 127.0.0.1 at 2012-03-26 15:12:35 -0400
1191
+ Processing by CopycatTranslationsController#import_export as HTML
1192
+ Rendered /vermonster/copycat/app/views/copycat_translations/import_export.html.erb within layouts/copycat (1.7ms)
1193
+ Completed 200 OK in 6ms (Views: 5.2ms | ActiveRecord: 0.0ms)
1194
+
1195
+
1196
+ Started GET "/assets/copycat_engine.css?body=1" for 127.0.0.1 at 2012-03-26 15:12:35 -0400
1197
+ Served asset /copycat_engine.css - 304 Not Modified (0ms)
1198
+
1199
+
1200
+ Started POST "/copycat_translations/upload" for 127.0.0.1 at 2012-03-26 15:12:37 -0400
1201
+ Processing by CopycatTranslationsController#upload as HTML
1202
+ Parameters: {"utf8"=>"✓", "authenticity_token"=>"Mj1Qcja3mVicC0PXcW5UEYJeskdTdT3UWjWm4M27ZjA=", "commit"=>"Upload"}
1203
+
1204
+ NoMethodError
1205
+ undefined method `tempfile' for nil:NilClass
1206
+ Rendered /vermonster/copycat/app/views/copycat_translations/import_export.html.erb within layouts/copycat (0.8ms)
1207
+ Completed 400 Bad Request in 4ms (Views: 3.1ms | ActiveRecord: 0.0ms)
1208
+
1209
+
1210
+ Started GET "/assets/copycat_engine.css?body=1" for 127.0.0.1 at 2012-03-26 15:12:37 -0400
1211
+ Served asset /copycat_engine.css - 304 Not Modified (0ms)
1212
+
1213
+
1214
+ Started POST "/copycat_translations/upload" for 127.0.0.1 at 2012-03-26 15:13:13 -0400
1215
+ Processing by CopycatTranslationsController#upload as HTML
1216
+ Parameters: {"utf8"=>"✓", "authenticity_token"=>"Mj1Qcja3mVicC0PXcW5UEYJeskdTdT3UWjWm4M27ZjA=", "file"=>#<ActionDispatch::Http::UploadedFile:0x00000103d314c8 @original_filename="x.yml", @content_type="application/octet-stream", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"x.yml\"\r\nContent-Type: application/octet-stream\r\n", @tempfile=#<File:/var/folders/rn/rnXUYLOZH-mYuzcjL2v8Fk+++TI/-Tmp-/RackMultipart20120326-13433-1fmkr9x>>, "commit"=>"Upload"}
1217
+ Completed 500 Internal Server Error in 3ms
1218
+
1219
+ SystemStackError (stack level too deep):
1220
+ actionpack (3.2.2) lib/action_dispatch/middleware/reloader.rb:70
1221
+
1222
+
1223
+ Rendered /Users/sjm/.rvm/gems/ruby-1.9.3-p125@copycat/gems/actionpack-3.2.2/lib/action_dispatch/middleware/templates/rescues/_trace.erb (1.2ms)
1224
+ Rendered /Users/sjm/.rvm/gems/ruby-1.9.3-p125@copycat/gems/actionpack-3.2.2/lib/action_dispatch/middleware/templates/rescues/_request_and_response.erb (1.2ms)
1225
+ Rendered /Users/sjm/.rvm/gems/ruby-1.9.3-p125@copycat/gems/actionpack-3.2.2/lib/action_dispatch/middleware/templates/rescues/diagnostics.erb within rescues/layout (9.0ms)
1226
+
1227
+
1228
+ Started POST "/copycat_translations/upload" for 127.0.0.1 at 2012-03-26 15:15:27 -0400
1229
+ Processing by CopycatTranslationsController#upload as HTML
1230
+ Parameters: {"utf8"=>"✓", "authenticity_token"=>"Mj1Qcja3mVicC0PXcW5UEYJeskdTdT3UWjWm4M27ZjA=", "file"=>#<ActionDispatch::Http::UploadedFile:0x0000010411b0c0 @original_filename="x.yml", @content_type="application/octet-stream", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"x.yml\"\r\nContent-Type: application/octet-stream\r\n", @tempfile=#<File:/var/folders/rn/rnXUYLOZH-mYuzcjL2v8Fk+++TI/-Tmp-/RackMultipart20120326-13517-nhf0eh>>, "commit"=>"Upload"}
1231
+
1232
+ SystemStackError
1233
+ stack level too deep
1234
+ Rendered /vermonster/copycat/app/views/copycat_translations/import_export.html.erb within layouts/copycat (2.6ms)
1235
+ Completed 400 Bad Request in 16ms (Views: 13.5ms | ActiveRecord: 0.0ms)
1236
+
1237
+
1238
+ Started GET "/assets/copycat_engine.css?body=1" for 127.0.0.1 at 2012-03-26 15:15:27 -0400
1239
+ Served asset /copycat_engine.css - 200 OK (1ms)