copycat 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/MIT-LICENSE +1 -1
- data/README.md +53 -0
- data/Rakefile +3 -13
- data/app/assets/stylesheets/copycat/copycat.css +44 -0
- data/app/controllers/copycat_translations_controller.rb +45 -0
- data/app/models/copycat_translation.rb +27 -0
- data/app/views/copycat_translations/edit.html.erb +7 -0
- data/app/views/copycat_translations/index.html.erb +26 -0
- data/app/views/copycat_translations/readme.html.erb +41 -0
- data/app/views/copycat_translations/upload.html.erb +18 -0
- data/config/routes.rb +7 -0
- data/db/migrate/20120313191745_create_copycat_translations.rb +13 -0
- data/lib/copycat/engine.rb +4 -0
- data/lib/copycat/version.rb +1 -1
- data/lib/copycat.rb +91 -0
- data/{test → spec}/dummy/Rakefile +0 -0
- data/spec/dummy/app/assets/javascripts/application.js +9 -0
- data/spec/dummy/app/assets/stylesheets/application.css +7 -0
- data/spec/dummy/app/assets/stylesheets/copycat.css +44 -0
- data/{test → spec}/dummy/app/controllers/application_controller.rb +0 -0
- data/spec/dummy/app/controllers/site_controller.rb +5 -0
- data/{test → spec}/dummy/app/helpers/application_helper.rb +0 -0
- data/spec/dummy/app/views/layouts/application.html.erb +12 -0
- data/spec/dummy/app/views/site/index.html.erb +3 -0
- data/{test → spec}/dummy/config/application.rb +0 -11
- data/{test → spec}/dummy/config/boot.rb +0 -0
- data/{test → spec}/dummy/config/database.yml +0 -0
- data/{test → spec}/dummy/config/environment.rb +0 -0
- data/{test → spec}/dummy/config/environments/development.rb +1 -8
- data/{test → spec}/dummy/config/environments/production.rb +1 -8
- data/{test → spec}/dummy/config/environments/test.rb +6 -4
- data/{test → spec}/dummy/config/initializers/backtrace_silencers.rb +0 -0
- data/{test → spec}/dummy/config/initializers/inflections.rb +0 -5
- data/{test → spec}/dummy/config/initializers/mime_types.rb +0 -0
- data/{test → spec}/dummy/config/initializers/secret_token.rb +1 -1
- data/{test → spec}/dummy/config/initializers/session_store.rb +0 -0
- data/{test → spec}/dummy/config/initializers/wrap_parameters.rb +0 -0
- data/{test → spec}/dummy/config/locales/en.yml +3 -1
- data/spec/dummy/config/routes.rb +3 -0
- data/{test → spec}/dummy/config.ru +0 -0
- data/spec/dummy/db/development.sqlite3 +0 -0
- data/spec/dummy/db/migrate/20120313192639_create_copycat_translations.copycat_engine.rb +14 -0
- data/spec/dummy/db/schema.rb +23 -0
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/log/development.log +113 -0
- data/spec/dummy/log/test.log +5715 -0
- data/{test → spec}/dummy/public/404.html +0 -0
- data/{test → spec}/dummy/public/422.html +0 -0
- data/{test → spec}/dummy/public/500.html +1 -0
- data/{test → spec}/dummy/public/favicon.ico +0 -0
- data/{test → spec}/dummy/script/rails +0 -0
- data/spec/dummy/tmp/cache/assets/CD8/370/sprockets%2F357970feca3ac29060c1e3861e2c0953 +0 -0
- data/spec/dummy/tmp/cache/assets/D1A/DB0/sprockets%2F26d700197b8d25f954d56d8f31f2c8bc +0 -0
- data/spec/dummy/tmp/cache/assets/D32/A10/sprockets%2F13fe41fee1fe35b49d145bcc06610705 +0 -0
- data/spec/dummy/tmp/cache/assets/D5A/EA0/sprockets%2Fd771ace226fc8215a3572e0aa35bb0d6 +0 -0
- data/spec/dummy/tmp/cache/assets/DDD/780/sprockets%2Fe7880b84c3ecb507fabc99b9ef6b70e3 +0 -0
- data/spec/factories/copycat_translations.rb +11 -0
- data/spec/integration/copycat_spec.rb +83 -0
- data/spec/lib/copycat_spec.rb +61 -0
- data/spec/models/copycat_translation_spec.rb +64 -0
- data/spec/spec_helper.rb +11 -0
- metadata +115 -89
- data/README.rdoc +0 -3
- data/test/copycat_test.rb +0 -7
- data/test/dummy/README.rdoc +0 -261
- data/test/dummy/app/assets/javascripts/application.js +0 -15
- data/test/dummy/app/assets/stylesheets/application.css +0 -13
- data/test/dummy/app/views/layouts/application.html.erb +0 -14
- data/test/dummy/config/routes.rb +0 -58
- data/test/test_helper.rb +0 -10
File without changes
|
Binary file
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# This migration comes from copycat_engine (originally 20120313191745)
|
2
|
+
class CreateCopycatTranslations < ActiveRecord::Migration
|
3
|
+
def up
|
4
|
+
create_table :copycat_translations do |t|
|
5
|
+
t.string "key"
|
6
|
+
t.text "value"
|
7
|
+
t.timestamps
|
8
|
+
end
|
9
|
+
end
|
10
|
+
|
11
|
+
def down
|
12
|
+
drop_table :copycat_translations
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
# encoding: UTF-8
|
2
|
+
# This file is auto-generated from the current state of the database. Instead
|
3
|
+
# of editing this file, please use the migrations feature of Active Record to
|
4
|
+
# incrementally modify your database, and then regenerate this schema definition.
|
5
|
+
#
|
6
|
+
# Note that this schema.rb definition is the authoritative source for your
|
7
|
+
# database schema. If you need to create the application database on another
|
8
|
+
# system, you should be using db:schema:load, not running all the migrations
|
9
|
+
# from scratch. The latter is a flawed and unsustainable approach (the more migrations
|
10
|
+
# you'll amass, the slower it'll run and the greater likelihood for issues).
|
11
|
+
#
|
12
|
+
# It's strongly recommended to check this file into your version control system.
|
13
|
+
|
14
|
+
ActiveRecord::Schema.define(:version => 20120313192639) do
|
15
|
+
|
16
|
+
create_table "copycat_translations", :force => true do |t|
|
17
|
+
t.string "key"
|
18
|
+
t.text "value"
|
19
|
+
t.datetime "created_at", :null => false
|
20
|
+
t.datetime "updated_at", :null => false
|
21
|
+
end
|
22
|
+
|
23
|
+
end
|
Binary file
|
@@ -0,0 +1,113 @@
|
|
1
|
+
[1m[36m (0.1ms)[0m [1mselect sqlite_version(*)[0m
|
2
|
+
[1m[35m (2.3ms)[0m CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
|
3
|
+
[1m[36m (0.0ms)[0m [1mPRAGMA index_list("schema_migrations")[0m
|
4
|
+
[1m[35m (1.3ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
5
|
+
[1m[36m (0.1ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
6
|
+
Migrating to CreateCopycatTranslations (20120313192639)
|
7
|
+
[1m[35m (0.0ms)[0m begin transaction
|
8
|
+
[1m[36m (0.3ms)[0m [1mCREATE TABLE "copycat_translations" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "key" varchar(255), "value" text, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) [0m
|
9
|
+
[1m[35m (0.1ms)[0m INSERT INTO "schema_migrations" ("version") VALUES ('20120313192639')
|
10
|
+
[1m[36m (1.0ms)[0m [1mcommit transaction[0m
|
11
|
+
[1m[35m (0.2ms)[0m select sqlite_version(*)
|
12
|
+
[1m[36m (0.1ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
13
|
+
[1m[35m (0.0ms)[0m PRAGMA index_list("copycat_translations")
|
14
|
+
|
15
|
+
|
16
|
+
Started GET "/" for 127.0.0.1 at 2012-03-13 15:27:12 -0400
|
17
|
+
Processing by SiteController#index as HTML
|
18
|
+
[1m[36mCopycatTranslation Load (0.1ms)[0m [1mSELECT "copycat_translations".* FROM "copycat_translations" WHERE (key = 'sample_copy') LIMIT 1[0m
|
19
|
+
Rendered site/index.html.erb within layouts/application (34.2ms)
|
20
|
+
Compiled application.css (0ms) (pid 64157)
|
21
|
+
Completed 500 Internal Server Error in 59ms
|
22
|
+
|
23
|
+
ActionView::Template::Error (couldn't find file 'jquery'
|
24
|
+
(in /vermonster/copycat/spec/dummy/app/assets/javascripts/application.js:7)):
|
25
|
+
3: <head>
|
26
|
+
4: <title>Dummy</title>
|
27
|
+
5: <%= stylesheet_link_tag "application" %>
|
28
|
+
6: <%= javascript_include_tag "application" %>
|
29
|
+
7: <%= csrf_meta_tags %>
|
30
|
+
8: </head>
|
31
|
+
9: <body>
|
32
|
+
app/views/layouts/application.html.erb:6:in `_app_views_layouts_application_html_erb__1893800054813943359_2183503320'
|
33
|
+
|
34
|
+
|
35
|
+
Rendered /Users/sjm/.rvm/gems/ruby-1.9.3-p125@copycat/gems/actionpack-3.2.2/lib/action_dispatch/middleware/templates/rescues/_trace.erb (18.4ms)
|
36
|
+
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.0ms)
|
37
|
+
Rendered /Users/sjm/.rvm/gems/ruby-1.9.3-p125@copycat/gems/actionpack-3.2.2/lib/action_dispatch/middleware/templates/rescues/template_error.erb within rescues/layout (26.1ms)
|
38
|
+
|
39
|
+
|
40
|
+
Started GET "/" for 127.0.0.1 at 2012-03-13 15:28:56 -0400
|
41
|
+
Processing by SiteController#index as HTML
|
42
|
+
[1m[35mCopycatTranslation Load (0.1ms)[0m SELECT "copycat_translations".* FROM "copycat_translations" WHERE (key = 'sample_copy') LIMIT 1
|
43
|
+
Rendered site/index.html.erb within layouts/application (0.6ms)
|
44
|
+
Completed 200 OK in 3ms (Views: 2.2ms | ActiveRecord: 0.1ms)
|
45
|
+
[1m[36m (0.1ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
46
|
+
[1m[36m (0.1ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
47
|
+
[1m[35m (0.1ms)[0m select sqlite_version(*)
|
48
|
+
[1m[36m (2.5ms)[0m [1mCREATE TABLE "copycat_translations" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "key" varchar(255), "value" text, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) [0m
|
49
|
+
[1m[35m (0.7ms)[0m CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
|
50
|
+
[1m[36m (0.0ms)[0m [1mPRAGMA index_list("schema_migrations")[0m
|
51
|
+
[1m[35m (0.9ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
52
|
+
[1m[36m (0.1ms)[0m [1mSELECT version FROM "schema_migrations"[0m
|
53
|
+
[1m[35m (0.7ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20120313192639')
|
54
|
+
|
55
|
+
|
56
|
+
Started GET "/" for 127.0.0.1 at 2012-03-15 14:53:11 -0400
|
57
|
+
Processing by SiteController#index as HTML
|
58
|
+
[1m[36mCopycatTranslation Load (0.5ms)[0m [1mSELECT "copycat_translations".* FROM "copycat_translations" WHERE "copycat_translations"."key" = 'site.index.header' LIMIT 1[0m
|
59
|
+
[1m[35m (0.1ms)[0m begin transaction
|
60
|
+
[1m[36mCopycatTranslation Exists (0.1ms)[0m [1mSELECT 1 FROM "copycat_translations" WHERE "copycat_translations"."key" = 'site.index.header' LIMIT 1[0m
|
61
|
+
[1m[35mSQL (1.4ms)[0m INSERT INTO "copycat_translations" ("created_at", "key", "updated_at", "value") VALUES (?, ?, ?, ?) [["created_at", Thu, 15 Mar 2012 18:53:11 UTC +00:00], ["key", "site.index.header"], ["updated_at", Thu, 15 Mar 2012 18:53:11 UTC +00:00], ["value", "The Header"]]
|
62
|
+
[1m[36m (1.0ms)[0m [1mcommit transaction[0m
|
63
|
+
[1m[35mCopycatTranslation Load (0.1ms)[0m SELECT "copycat_translations".* FROM "copycat_translations" WHERE "copycat_translations"."key" = 'site.index.intro' LIMIT 1
|
64
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
65
|
+
[1m[35mCopycatTranslation Exists (0.1ms)[0m SELECT 1 FROM "copycat_translations" WHERE "copycat_translations"."key" = 'site.index.intro' LIMIT 1
|
66
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "copycat_translations" ("created_at", "key", "updated_at", "value") VALUES (?, ?, ?, ?)[0m [["created_at", Thu, 15 Mar 2012 18:53:11 UTC +00:00], ["key", "site.index.intro"], ["updated_at", Thu, 15 Mar 2012 18:53:11 UTC +00:00], ["value", "site.index.intro"]]
|
67
|
+
[1m[35m (0.7ms)[0m commit transaction
|
68
|
+
Rendered site/index.html.erb within layouts/application (89.7ms)
|
69
|
+
Compiled copycat.css (0ms) (pid 16641)
|
70
|
+
Compiled application.css (6ms) (pid 16641)
|
71
|
+
Completed 200 OK in 114ms (Views: 107.7ms | ActiveRecord: 5.7ms)
|
72
|
+
|
73
|
+
|
74
|
+
Started GET "/assets/copycat.css?body=1" for 127.0.0.1 at 2012-03-15 14:53:11 -0400
|
75
|
+
Served asset /copycat.css - 200 OK (1ms)
|
76
|
+
|
77
|
+
|
78
|
+
Started GET "/assets/application.css?body=1" for 127.0.0.1 at 2012-03-15 14:53:11 -0400
|
79
|
+
Served asset /application.css - 200 OK (2ms)
|
80
|
+
|
81
|
+
|
82
|
+
Started GET "/copycat_translations" for 127.0.0.1 at 2012-03-15 14:53:19 -0400
|
83
|
+
Processing by CopycatTranslationsController#index as HTML
|
84
|
+
[1m[36mCopycatTranslation Load (0.1ms)[0m [1mSELECT "copycat_translations".* FROM "copycat_translations" [0m
|
85
|
+
Rendered /vermonster/copycat/app/views/copycat_translations/index.html.erb within layouts/application (1.5ms)
|
86
|
+
Completed 200 OK in 6ms (Views: 4.4ms | ActiveRecord: 0.1ms)
|
87
|
+
|
88
|
+
|
89
|
+
Started GET "/copycat_translations/upload" for 127.0.0.1 at 2012-03-15 14:53:21 -0400
|
90
|
+
Processing by CopycatTranslationsController#upload as HTML
|
91
|
+
Rendered /vermonster/copycat/app/views/copycat_translations/upload.html.erb within layouts/application (1.6ms)
|
92
|
+
Completed 200 OK in 5ms (Views: 4.7ms | ActiveRecord: 0.0ms)
|
93
|
+
|
94
|
+
|
95
|
+
Started POST "/copycat_translations/import_yaml" for 127.0.0.1 at 2012-03-15 14:53:28 -0400
|
96
|
+
Processing by CopycatTranslationsController#import_yaml as HTML
|
97
|
+
Parameters: {"utf8"=>"✓", "authenticity_token"=>"PgZqSZfOjZhvTAu+xHuBH36AZqWxY9zQRY9uEcIbPG4=", "file"=>#<ActionDispatch::Http::UploadedFile:0x00000102c34ff8 @original_filename="favicon.ico", @content_type="image/vnd.microsoft.icon", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"favicon.ico\"\r\nContent-Type: image/vnd.microsoft.icon\r\n", @tempfile=#<File:/var/folders/rn/rnXUYLOZH-mYuzcjL2v8Fk+++TI/-Tmp-/RackMultipart20120315-16641-14z0cds>>, "commit"=>"Upload"}
|
98
|
+
Rendered /vermonster/copycat/app/views/copycat_translations/upload.html.erb within layouts/application (0.7ms)
|
99
|
+
Completed 400 Bad Request in 3ms (Views: 2.9ms | ActiveRecord: 0.0ms)
|
100
|
+
|
101
|
+
|
102
|
+
Started POST "/copycat_translations/import_yaml" for 127.0.0.1 at 2012-03-15 14:54:42 -0400
|
103
|
+
Processing by CopycatTranslationsController#import_yaml as HTML
|
104
|
+
Parameters: {"utf8"=>"✓", "authenticity_token"=>"PgZqSZfOjZhvTAu+xHuBH36AZqWxY9zQRY9uEcIbPG4=", "file"=>#<ActionDispatch::Http::UploadedFile:0x00000102a36f08 @original_filename="favicon.ico", @content_type="image/vnd.microsoft.icon", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"favicon.ico\"\r\nContent-Type: image/vnd.microsoft.icon\r\n", @tempfile=#<File:/var/folders/rn/rnXUYLOZH-mYuzcjL2v8Fk+++TI/-Tmp-/RackMultipart20120315-16641-1qimh8k>>, "commit"=>"Upload"}
|
105
|
+
Rendered /vermonster/copycat/app/views/copycat_translations/upload.html.erb within layouts/application (20.7ms)
|
106
|
+
Completed 400 Bad Request in 24ms (Views: 23.6ms | ActiveRecord: 0.0ms)
|
107
|
+
|
108
|
+
|
109
|
+
Started POST "/copycat_translations/import_yaml" for 127.0.0.1 at 2012-03-15 14:54:56 -0400
|
110
|
+
Processing by CopycatTranslationsController#import_yaml as HTML
|
111
|
+
Parameters: {"utf8"=>"✓", "authenticity_token"=>"PgZqSZfOjZhvTAu+xHuBH36AZqWxY9zQRY9uEcIbPG4=", "file"=>#<ActionDispatch::Http::UploadedFile:0x000001008ea980 @original_filename="TODO.txt", @content_type="text/plain", @headers="Content-Disposition: form-data; name=\"file\"; filename=\"TODO.txt\"\r\nContent-Type: text/plain\r\n", @tempfile=#<File:/var/folders/rn/rnXUYLOZH-mYuzcjL2v8Fk+++TI/-Tmp-/RackMultipart20120315-16641-1votv6a>>, "commit"=>"Upload"}
|
112
|
+
Rendered /vermonster/copycat/app/views/copycat_translations/upload.html.erb within layouts/application (0.7ms)
|
113
|
+
Completed 400 Bad Request in 3ms (Views: 2.9ms | ActiveRecord: 0.0ms)
|