copycat 0.0.4 → 0.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (29) hide show
  1. data/README.md +12 -2
  2. data/app/assets/stylesheets/copycat_engine.css +417 -38
  3. data/app/controllers/copycat_translations_controller.rb +22 -9
  4. data/app/views/copycat_translations/edit.html.erb +2 -1
  5. data/app/views/copycat_translations/help.html.erb +25 -0
  6. data/app/views/copycat_translations/{upload.html.erb → import_export.html.erb} +8 -3
  7. data/app/views/copycat_translations/index.html.erb +27 -17
  8. data/app/views/layouts/copycat.html.erb +15 -4
  9. data/config/routes.rb +6 -3
  10. data/lib/copycat/version.rb +1 -1
  11. data/lib/copycat.rb +7 -13
  12. data/spec/dummy/config/initializers/copycat.rb +2 -2
  13. data/spec/dummy/db/development.sqlite3 +0 -0
  14. data/spec/dummy/db/migrate/{20120320143433_create_copycat_translations.copycat_engine.rb → 20120320194234_create_copycat_translations.copycat_engine.rb} +0 -0
  15. data/spec/dummy/db/schema.rb +1 -1
  16. data/spec/dummy/db/test.sqlite3 +0 -0
  17. data/spec/dummy/log/development.log +5429 -0
  18. data/spec/dummy/log/test.log +10221 -0
  19. data/spec/dummy/tmp/cache/assets/C19/060/sprockets%2F125436f53217b7f564aa5016d1168709 +0 -0
  20. data/spec/dummy/tmp/cache/assets/CB3/6E0/sprockets%2F0f4c96b04436bf7ae900561753947d4c +0 -0
  21. data/spec/dummy/tmp/cache/assets/DA4/EE0/sprockets%2Fcd39e3d56788faea331e0f5bac67329b +0 -0
  22. data/spec/dummy/tmp/pids/server.pid +1 -0
  23. data/spec/factories/copycat_translations.rb +1 -1
  24. data/spec/integration/copycat_spec.rb +197 -54
  25. data/spec/integration/dummy_spec.rb +63 -0
  26. data/spec/spec_helper.rb +1 -0
  27. metadata +18 -9
  28. data/app/views/copycat_translations/_copycat_header.html.erb +0 -9
  29. data/app/views/copycat_translations/readme.html.erb +0 -27
@@ -0,0 +1 @@
1
+ 81725
@@ -6,7 +6,7 @@ FactoryGirl.define do
6
6
  factory :copycat_translation do
7
7
  key { Factory.next(:string) }
8
8
  value { Factory.next(:string) }
9
- locale { "en" }
9
+ locale I18n.default_locale
10
10
  end
11
11
  end
12
12
 
@@ -2,41 +2,198 @@
2
2
 
3
3
  require 'spec_helper'
4
4
 
5
- feature "use #t" do
6
5
 
7
- it "the dummy app has a translation for site.index.header but not site.index.intro" do
8
- I18n.t('site.index.header').should == 'The Header'
9
- I18n.t('site.index.intro').should == "translation missing: en.site.index.intro"
6
+ feature "copycat index" do
7
+
8
+ before do
9
+ Factory(:copycat_translation, :key => "foo", :value => "bar")
10
+ page.driver.browser.basic_authorize COPYCAT_USERNAME, COPYCAT_PASSWORD
11
+ visit copycat_translations_path
10
12
  end
11
13
 
12
- it "uses i18n.t" do
13
- visit root_path
14
- page.should have_content 'The Header'
15
- page.should have_content 'Intro' #ActionView::Helpers::TranslationHelper#translate wrapper
14
+ it "has a nav bar" do
15
+ click_link 'Import / Export'
16
+ click_link 'Help'
17
+ click_link 'Search'
16
18
  end
17
19
 
18
- it "creates a copycat_translation if the yaml has an entry" do
19
- CopycatTranslation.find_by_key('site.index.header').should be_nil
20
- visit root_path
21
- CopycatTranslation.find_by_key('site.index.header').should_not be_nil
20
+ it "doesn't show any tokens by default" do
21
+ page.should_not have_content 'foo'
22
+ page.should_not have_content 'bar'
22
23
  end
23
24
 
24
- it "creates a copycat_translation if the yaml does not have an entry" do
25
- CopycatTranslation.find_by_key('site.index.intro').should be_nil
26
- visit root_path
27
- CopycatTranslation.find_by_key('site.index.intro').should_not be_nil
25
+ it "allows search by key" do
26
+ fill_in 'search', :with => 'foo'
27
+ click_button 'Search'
28
+ page.should have_content 'foo'
29
+ page.should have_content 'bar'
28
30
  end
29
31
 
30
- it "shows the copycat_translation instead of the yaml" do
31
- FactoryGirl.create(:copycat_translation, key: 'site.index.header', value: 'A different header')
32
- visit root_path
33
- page.should_not have_content 'The Header'
34
- page.should have_content 'A different header'
32
+ it "allows search by key" do
33
+ fill_in 'search', :with => 'xfoo'
34
+ click_button 'Search'
35
+ page.should_not have_content 'foo'
36
+ page.should_not have_content 'bar'
35
37
  end
36
38
 
37
- end
39
+ it "allows search by value" do
40
+ fill_in 'search', :with => 'bar'
41
+ click_button 'Search'
42
+ page.should have_content 'foo'
43
+ page.should have_content 'bar'
44
+ end
45
+
46
+ it "allows search by value" do
47
+ fill_in 'search', :with => 'xbar'
48
+ click_button 'Search'
49
+ page.should_not have_content 'foo'
50
+ page.should_not have_content 'bar'
51
+ end
52
+
53
+ it "searches in the middles of strings" do
54
+ Factory(:copycat_translation, :key => "site.index.something")
55
+ fill_in 'search', :with => 'index'
56
+ click_button 'Search'
57
+ page.should have_content 'site.index.something'
58
+ end
59
+
60
+ it "can show all" do
61
+ Factory(:copycat_translation, :key => "foe", :value => "beer")
62
+ click_button 'Search'
63
+ page.should have_content 'foo'
64
+ page.should have_content 'foe'
65
+ end
66
+
67
+ context "more than one locale" do
68
+
69
+ before do
70
+ CopycatTranslation.destroy_all
71
+ Factory(:copycat_translation, key: "foo", value: "bar1", locale: "en")
72
+ Factory(:copycat_translation, key: "foo", value: "bar2", locale: "fa")
73
+ Factory(:copycat_translation, key: "foo", value: "bar3", locale: "it")
74
+ end
75
+
76
+ #locale
77
+ # 1. not on URL at all
78
+ # - set to default_locale
79
+ # 2. present but blank
80
+ # 3. present with value
81
+
82
+ #search
83
+ # 1. not on URL at all
84
+ # - show nothing
85
+ # 2. present but blank
86
+ # - show everything
87
+ # - L1 got set to default locale
88
+ # - L2 show for all locales
89
+ # - L3 scope to one locale
90
+ # 3. present with value
91
+ # - show matching
92
+ # - L1 got set to default locale
93
+ # - L2 show for all locales
94
+ # - L3 scope to one locale
95
+
96
+ it "nil locale, nil search" do
97
+ visit copycat_translations_path
98
+ page.should_not have_content 'foo'
99
+ end
100
+
101
+ it "nil locale, blank search" do
102
+ # impossible for user to replicate this case
103
+ visit "/copycat_translations?search=&commit=Search"
104
+ page.should have_content 'bar1'
105
+ page.should_not have_content 'bar2'
106
+ page.should_not have_content 'bar3'
107
+ end
108
+
109
+ it "nil locale, present search" do
110
+ # impossible for user to replicate this case
111
+ visit "/copycat_translations?search=foo&commit=Search"
112
+ page.should have_content 'bar1'
113
+ page.should_not have_content 'bar2'
114
+ page.should_not have_content 'bar3'
115
+ visit "/copycat_translations?search=fuu&commit=Search"
116
+ page.should_not have_content 'foo'
117
+ end
118
+
119
+ it "blank locale, nil search" do
120
+ # impossible for user to replicate this case
121
+ visit "/copycat_translations?locale=&commit=Search"
122
+ page.should_not have_content 'foo'
123
+ end
38
124
 
39
- require 'tempfile'
125
+ it "blank locale, blank search" do
126
+ select '', :from => 'locale'
127
+ click_button 'Search'
128
+ page.should have_content 'bar1'
129
+ page.should have_content 'bar2'
130
+ page.should have_content 'bar3'
131
+ end
132
+
133
+ it "blank locale, present search" do
134
+ select '', :from => 'locale'
135
+ fill_in 'search', :with => 'foo'
136
+ click_button 'Search'
137
+ page.should have_content 'bar1'
138
+ page.should have_content 'bar2'
139
+ page.should have_content 'bar3'
140
+ fill_in 'search', :with => 'fuu'
141
+ click_button 'Search'
142
+ page.should_not have_content 'foo'
143
+ end
144
+
145
+ it "present locale, nil search" do
146
+ # impossible for user to replicate this case
147
+ visit "/copycat_translations?locale=en&commit=Search"
148
+ page.should_not have_content 'foo'
149
+ end
150
+
151
+ it "present locale, blank search" do
152
+ select 'en', :from => 'locale'
153
+ click_button 'Search'
154
+ page.should have_content 'bar1'
155
+ page.should_not have_content 'bar2'
156
+ page.should_not have_content 'bar3'
157
+ select 'fa', :from => 'locale'
158
+ click_button 'Search'
159
+ page.should_not have_content 'bar1'
160
+ page.should have_content 'bar2'
161
+ page.should_not have_content 'bar3'
162
+ select 'it', :from => 'locale'
163
+ click_button 'Search'
164
+ page.should_not have_content 'bar1'
165
+ page.should_not have_content 'bar2'
166
+ page.should have_content 'bar3'
167
+ end
168
+
169
+ it "present locale, present search" do
170
+ select 'en', :from => 'locale'
171
+ fill_in 'search', :with => 'foo'
172
+ click_button 'Search'
173
+ page.should have_content 'bar1'
174
+ page.should_not have_content 'bar2'
175
+ page.should_not have_content 'bar3'
176
+ select 'fa', :from => 'locale'
177
+ fill_in 'search', :with => 'foo'
178
+ click_button 'Search'
179
+ page.should_not have_content 'bar1'
180
+ page.should have_content 'bar2'
181
+ page.should_not have_content 'bar3'
182
+ select 'it', :from => 'locale'
183
+ fill_in 'search', :with => 'foo'
184
+ click_button 'Search'
185
+ page.should_not have_content 'bar1'
186
+ page.should_not have_content 'bar2'
187
+ page.should have_content 'bar3'
188
+ select 'en', :from => 'locale'
189
+ fill_in 'search', :with => 'fuu'
190
+ click_button 'Search'
191
+ page.should_not have_content 'foo'
192
+ end
193
+
194
+ end
195
+
196
+ end
40
197
 
41
198
  feature "downloading and uploading yaml files" do
42
199
  before do
@@ -51,7 +208,8 @@ feature "downloading and uploading yaml files" do
51
208
  Factory(:copycat_translation, :key => 2, :value => "bar5")
52
209
  assert CopycatTranslation.count == 5
53
210
 
54
- visit "/copycat_translations.yaml"
211
+ visit import_export_copycat_translations_path
212
+ click_link 'Download as YAML'
55
213
  CopycatTranslation.destroy_all
56
214
  assert CopycatTranslation.count == 0
57
215
 
@@ -60,7 +218,7 @@ feature "downloading and uploading yaml files" do
60
218
  file.write yaml
61
219
  file.close
62
220
 
63
- visit upload_copycat_translations_path
221
+ visit import_export_copycat_translations_path
64
222
  attach_file "file", file.path
65
223
  click_button "Upload"
66
224
  file.unlink
@@ -74,18 +232,23 @@ feature "downloading and uploading yaml files" do
74
232
  end
75
233
 
76
234
  it "round-trips the yaml with complicated text" do
77
- Factory(:copycat_translation, :key => "a.foo", :value => "“hello world“ üokåa®fgsdf;::fs;kdf")
78
- visit "/copycat_translations.yaml"
235
+ value = "“hello world“ üokåa®fgsdf;::fs;kdf"
236
+ Factory(:copycat_translation, :key => "a.foo", :value => value)
237
+
238
+ visit import_export_copycat_translations_path
239
+ click_link 'Download as YAML'
79
240
  CopycatTranslation.destroy_all
241
+
80
242
  yaml = page.text
81
243
  file = Tempfile.new 'copycat'
82
244
  file.write yaml
83
245
  file.close
84
- visit upload_copycat_translations_path
246
+
247
+ visit import_export_copycat_translations_path
85
248
  attach_file "file", file.path
86
249
  click_button "Upload"
87
250
  file.unlink
88
- assert CopycatTranslation.find_by_key("a.foo").value == "“hello world“ üokåa®fgsdf;::fs;kdf"
251
+ assert CopycatTranslation.find_by_key("a.foo").value == value
89
252
  end
90
253
 
91
254
  it "gives 400 on bad upload" do
@@ -93,7 +256,7 @@ feature "downloading and uploading yaml files" do
93
256
  file.write "<<<%%#$W%s"
94
257
  file.close
95
258
 
96
- visit upload_copycat_translations_path
259
+ visit import_export_copycat_translations_path
97
260
  attach_file "file", file.path
98
261
  click_button "Upload"
99
262
  file.unlink
@@ -105,27 +268,9 @@ feature "downloading and uploading yaml files" do
105
268
  end
106
269
 
107
270
  feature "locales" do
271
+ before do
108
272
 
109
- it "displays different text based on users' locale" do
110
- Factory(:copycat_translation, locale: 'en', key: 'site.index.intro', value: 'world')
111
- Factory(:copycat_translation, locale: 'es', key: 'site.index.intro', value: 'mundo')
112
-
113
- I18n.locale = :en
114
- visit root_path
115
- page.should have_content 'world'
116
- page.should_not have_content 'mundo'
117
-
118
- I18n.locale = :es
119
- visit root_path
120
- page.should have_content 'mundo'
121
- page.should_not have_content 'world'
122
-
123
- I18n.locale = :fa
124
- visit root_path
125
- page.should_not have_content 'world'
126
- page.should_not have_content 'mundo'
127
-
128
- I18n.locale = :en # reset
273
+ page.driver.browser.basic_authorize COPYCAT_USERNAME, COPYCAT_PASSWORD
129
274
  end
130
275
 
131
276
  it "imports yaml containing multiple locales" do
@@ -138,8 +283,7 @@ feature "locales" do
138
283
  YAML
139
284
  file.close
140
285
 
141
- page.driver.browser.basic_authorize COPYCAT_USERNAME, COPYCAT_PASSWORD
142
- visit upload_copycat_translations_path
286
+ visit import_export_copycat_translations_path
143
287
  attach_file "file", file.path
144
288
  click_button "Upload"
145
289
  file.unlink
@@ -157,8 +301,7 @@ feature "locales" do
157
301
  Factory(:copycat_translation, locale: 'en', key: 'hello', value: 'world')
158
302
  Factory(:copycat_translation, locale: 'es', key: 'hello', value: 'mundo')
159
303
 
160
- page.driver.browser.basic_authorize COPYCAT_USERNAME, COPYCAT_PASSWORD
161
- visit "/copycat_translations.yaml"
304
+ visit download_copycat_translations_path
162
305
  yaml = page.text
163
306
  assert yaml =~ /en:\s*hello: world/
164
307
  assert yaml =~ /es:\s*hello: mundo/
@@ -0,0 +1,63 @@
1
+ #encoding: utf-8
2
+
3
+ require 'spec_helper'
4
+
5
+ feature "use #t" do
6
+
7
+ it "the dummy app has a translation for site.index.header but not site.index.intro" do
8
+ I18n.t('site.index.header').should == 'The Header'
9
+ I18n.t('site.index.intro').should == "translation missing: en.site.index.intro"
10
+ end
11
+
12
+ it "uses i18n.t" do
13
+ visit root_path
14
+ page.should have_content 'The Header'
15
+ page.should have_content 'Intro' #ActionView::Helpers::TranslationHelper#translate wrapper
16
+ end
17
+
18
+ it "creates a copycat_translation if the yaml has an entry" do
19
+ CopycatTranslation.find_by_key('site.index.header').should be_nil
20
+ visit root_path
21
+ CopycatTranslation.find_by_key('site.index.header').should_not be_nil
22
+ end
23
+
24
+ it "creates a copycat_translation if the yaml does not have an entry" do
25
+ CopycatTranslation.find_by_key('site.index.intro').should be_nil
26
+ visit root_path
27
+ CopycatTranslation.find_by_key('site.index.intro').should_not be_nil
28
+ end
29
+
30
+ it "shows the copycat_translation instead of the yaml" do
31
+ FactoryGirl.create(:copycat_translation, key: 'site.index.header', value: 'A different header')
32
+ visit root_path
33
+ page.should_not have_content 'The Header'
34
+ page.should have_content 'A different header'
35
+ end
36
+
37
+ end
38
+
39
+ feature "locales" do
40
+
41
+ it "displays different text based on users' locale" do
42
+ Factory(:copycat_translation, locale: 'en', key: 'site.index.intro', value: 'world')
43
+ Factory(:copycat_translation, locale: 'es', key: 'site.index.intro', value: 'mundo')
44
+
45
+ I18n.locale = :en
46
+ visit root_path
47
+ page.should have_content 'world'
48
+ page.should_not have_content 'mundo'
49
+
50
+ I18n.locale = :es
51
+ visit root_path
52
+ page.should have_content 'mundo'
53
+ page.should_not have_content 'world'
54
+
55
+ I18n.locale = :fa
56
+ visit root_path
57
+ page.should_not have_content 'world'
58
+ page.should_not have_content 'mundo'
59
+
60
+ I18n.locale = :en # reset
61
+ end
62
+
63
+ end
data/spec/spec_helper.rb CHANGED
@@ -2,6 +2,7 @@ ENV["RAILS_ENV"] = 'test'
2
2
  require File.expand_path("../dummy/config/environment.rb", __FILE__)
3
3
  require 'rspec/rails'
4
4
  require 'capybara/rspec'
5
+ require 'tempfile'
5
6
 
6
7
  Dir["#{File.dirname(__FILE__)}/factories/**/*.rb"].each { |f| require f }
7
8
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: copycat
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,11 +10,11 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2012-03-20 00:00:00.000000000 Z
13
+ date: 2012-03-22 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rails
17
- requirement: &2151799480 !ruby/object:Gem::Requirement
17
+ requirement: &2151799300 !ruby/object:Gem::Requirement
18
18
  none: false
19
19
  requirements:
20
20
  - - ! '>='
@@ -22,7 +22,7 @@ dependencies:
22
22
  version: 3.0.0
23
23
  type: :runtime
24
24
  prerelease: false
25
- version_requirements: *2151799480
25
+ version_requirements: *2151799300
26
26
  description: Edit live website copy.
27
27
  email:
28
28
  - info@vermonster.com
@@ -33,11 +33,10 @@ files:
33
33
  - app/assets/stylesheets/copycat_engine.css
34
34
  - app/controllers/copycat_translations_controller.rb
35
35
  - app/models/copycat_translation.rb
36
- - app/views/copycat_translations/_copycat_header.html.erb
37
36
  - app/views/copycat_translations/edit.html.erb
37
+ - app/views/copycat_translations/help.html.erb
38
+ - app/views/copycat_translations/import_export.html.erb
38
39
  - app/views/copycat_translations/index.html.erb
39
- - app/views/copycat_translations/readme.html.erb
40
- - app/views/copycat_translations/upload.html.erb
41
40
  - app/views/layouts/copycat.html.erb
42
41
  - config/routes.rb
43
42
  - db/migrate/20120313191745_create_copycat_translations.rb
@@ -73,7 +72,7 @@ files:
73
72
  - spec/dummy/config/routes.rb
74
73
  - spec/dummy/config.ru
75
74
  - spec/dummy/db/development.sqlite3
76
- - spec/dummy/db/migrate/20120320143433_create_copycat_translations.copycat_engine.rb
75
+ - spec/dummy/db/migrate/20120320194234_create_copycat_translations.copycat_engine.rb
77
76
  - spec/dummy/db/schema.rb
78
77
  - spec/dummy/db/test.sqlite3
79
78
  - spec/dummy/log/development.log
@@ -84,16 +83,21 @@ files:
84
83
  - spec/dummy/public/favicon.ico
85
84
  - spec/dummy/Rakefile
86
85
  - spec/dummy/script/rails
86
+ - spec/dummy/tmp/cache/assets/C19/060/sprockets%2F125436f53217b7f564aa5016d1168709
87
+ - spec/dummy/tmp/cache/assets/CB3/6E0/sprockets%2F0f4c96b04436bf7ae900561753947d4c
87
88
  - spec/dummy/tmp/cache/assets/CD8/370/sprockets%2F357970feca3ac29060c1e3861e2c0953
88
89
  - spec/dummy/tmp/cache/assets/D09/190/sprockets%2Fb2bddd007999a56d8b20c92301ea1983
89
90
  - spec/dummy/tmp/cache/assets/D1A/DB0/sprockets%2F26d700197b8d25f954d56d8f31f2c8bc
90
91
  - spec/dummy/tmp/cache/assets/D32/A10/sprockets%2F13fe41fee1fe35b49d145bcc06610705
91
92
  - spec/dummy/tmp/cache/assets/D5A/EA0/sprockets%2Fd771ace226fc8215a3572e0aa35bb0d6
93
+ - spec/dummy/tmp/cache/assets/DA4/EE0/sprockets%2Fcd39e3d56788faea331e0f5bac67329b
92
94
  - spec/dummy/tmp/cache/assets/DBD/220/sprockets%2F0cbff5c1a349439c1c444cbb4a57acc4
93
95
  - spec/dummy/tmp/cache/assets/DDD/780/sprockets%2Fe7880b84c3ecb507fabc99b9ef6b70e3
94
96
  - spec/dummy/tmp/cache/assets/DF8/310/sprockets%2Fccb12c4009c2f876d51dee8bae4c64ec
97
+ - spec/dummy/tmp/pids/server.pid
95
98
  - spec/factories/copycat_translations.rb
96
99
  - spec/integration/copycat_spec.rb
100
+ - spec/integration/dummy_spec.rb
97
101
  - spec/lib/copycat_spec.rb
98
102
  - spec/models/copycat_translation_spec.rb
99
103
  - spec/spec_helper.rb
@@ -147,7 +151,7 @@ test_files:
147
151
  - spec/dummy/config/routes.rb
148
152
  - spec/dummy/config.ru
149
153
  - spec/dummy/db/development.sqlite3
150
- - spec/dummy/db/migrate/20120320143433_create_copycat_translations.copycat_engine.rb
154
+ - spec/dummy/db/migrate/20120320194234_create_copycat_translations.copycat_engine.rb
151
155
  - spec/dummy/db/schema.rb
152
156
  - spec/dummy/db/test.sqlite3
153
157
  - spec/dummy/log/development.log
@@ -158,16 +162,21 @@ test_files:
158
162
  - spec/dummy/public/favicon.ico
159
163
  - spec/dummy/Rakefile
160
164
  - spec/dummy/script/rails
165
+ - spec/dummy/tmp/cache/assets/C19/060/sprockets%2F125436f53217b7f564aa5016d1168709
166
+ - spec/dummy/tmp/cache/assets/CB3/6E0/sprockets%2F0f4c96b04436bf7ae900561753947d4c
161
167
  - spec/dummy/tmp/cache/assets/CD8/370/sprockets%2F357970feca3ac29060c1e3861e2c0953
162
168
  - spec/dummy/tmp/cache/assets/D09/190/sprockets%2Fb2bddd007999a56d8b20c92301ea1983
163
169
  - spec/dummy/tmp/cache/assets/D1A/DB0/sprockets%2F26d700197b8d25f954d56d8f31f2c8bc
164
170
  - spec/dummy/tmp/cache/assets/D32/A10/sprockets%2F13fe41fee1fe35b49d145bcc06610705
165
171
  - spec/dummy/tmp/cache/assets/D5A/EA0/sprockets%2Fd771ace226fc8215a3572e0aa35bb0d6
172
+ - spec/dummy/tmp/cache/assets/DA4/EE0/sprockets%2Fcd39e3d56788faea331e0f5bac67329b
166
173
  - spec/dummy/tmp/cache/assets/DBD/220/sprockets%2F0cbff5c1a349439c1c444cbb4a57acc4
167
174
  - spec/dummy/tmp/cache/assets/DDD/780/sprockets%2Fe7880b84c3ecb507fabc99b9ef6b70e3
168
175
  - spec/dummy/tmp/cache/assets/DF8/310/sprockets%2Fccb12c4009c2f876d51dee8bae4c64ec
176
+ - spec/dummy/tmp/pids/server.pid
169
177
  - spec/factories/copycat_translations.rb
170
178
  - spec/integration/copycat_spec.rb
179
+ - spec/integration/dummy_spec.rb
171
180
  - spec/lib/copycat_spec.rb
172
181
  - spec/models/copycat_translation_spec.rb
173
182
  - spec/spec_helper.rb
@@ -1,9 +0,0 @@
1
- <div class="copycat-header">
2
- <ul>
3
- <li><a href=<%=copycat_translations_path%>><h2>Copycat</h2></a></li>
4
- <% href = copycat_translations_path + ".yaml" %>
5
- <li><a href=<%=href%>>Download</a></li>
6
- <li><a href=<%= upload_copycat_translations_path %>>Upload</a></li>
7
- <li><a href=<%= readme_copycat_translations_path %>>Readme</a></li>
8
- </ul>
9
- </div>
@@ -1,27 +0,0 @@
1
- <div id="readme">
2
-
3
- <div class="section">
4
- <h2> Copycat </h2>
5
- <p>Copycat is a Ruby on Rails engine that allows you to edit live website copy.</p>
6
- </div>
7
-
8
- <div class="section">
9
- <h2> How to use </h2>
10
- <p>The values you see here correspond to copy text in different parts of the parent website. When you edit them, the text on the website will change. Use ctrl/command-f to search for text, then click the left hand side links to edit. </p>
11
-
12
- <p>Values with keys ending in "_html" will be parsed as literal html, so you can insert tags. All other values are parsed as plain text.</p>
13
- </div>
14
-
15
- <div class="section">
16
- <h2> Importing and Exporting </h2>
17
- <p> Copycat text is data--not code. By default, Copycat values are stored in your server's database, and not the codebase that powers your website. Therefore, you may have to download/upload Copycat data to transfer your copy edits between servers, or to safeguard them between database wipes. Copycat exports (and is able to re-import) all of its data in a format called "YAML."</p>
18
- <h4> Downloading </h4>
19
- <p>You can get a YAML file of all your copy by clicking "Download" on the main Copycat page.</p>
20
- <h4> Uploading </h4>
21
- <p>You can upload copy to Copycat by clicking "Upload" on the main page and uploading a properly formatted YAML file. Uploading copy won't delete any entries from Copycat, but it may update them or create new ones. Use this feature to mass-update your copy from between servers -- e.g., make changes to copy on a test server, and then when you're satisfied, download the YAML file and upload it to your production site. Downloading your copy as YAML and then immediately re-uploading it will leave your copy unchanged.</p>
22
- <h4> Commiting copy to your codebase </h4>
23
- <p>If you're pretty happy with your copy and don't expect to need to update it live anymore, or just want a bit more security, you can download your copy as YAML and include it as part of the Ruby on Rails application underneath your main website. You can then remove Copycat from the application entirely, and the website will still run exactly as before--it interfaces with Ruby on Rails's built-in translation mechanisms in a very unobtrusive way.
24
- </div>
25
-
26
- </div>
27
-