copycat 0.2.1 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (26) hide show
  1. data/README.md +8 -1
  2. data/app/models/copycat_translation.rb +4 -0
  3. data/lib/copycat/version.rb +1 -1
  4. data/spec/dummy/config/initializers/copycat.rb +2 -2
  5. data/spec/dummy/db/development.sqlite3 +0 -0
  6. data/spec/dummy/db/migrate/{20120320194234_create_copycat_translations.copycat_engine.rb → 20120407193855_create_copycat_translations.copycat_engine.rb} +0 -0
  7. data/spec/dummy/db/schema.rb +1 -1
  8. data/spec/dummy/db/test.sqlite3 +0 -0
  9. data/spec/dummy/log/development.log +25 -1299
  10. data/spec/dummy/log/test.log +179 -23252
  11. data/spec/factories/copycat_translations.rb +2 -2
  12. data/spec/integration/copycat_spec.rb +16 -16
  13. data/spec/integration/dummy_spec.rb +2 -2
  14. data/spec/models/copycat_translation_spec.rb +7 -7
  15. metadata +65 -82
  16. data/spec/dummy/tmp/cache/assets/C19/060/sprockets%2F125436f53217b7f564aa5016d1168709 +0 -0
  17. data/spec/dummy/tmp/cache/assets/CB3/6E0/sprockets%2F0f4c96b04436bf7ae900561753947d4c +0 -0
  18. data/spec/dummy/tmp/cache/assets/CD8/370/sprockets%2F357970feca3ac29060c1e3861e2c0953 +0 -0
  19. data/spec/dummy/tmp/cache/assets/D09/190/sprockets%2Fb2bddd007999a56d8b20c92301ea1983 +0 -0
  20. data/spec/dummy/tmp/cache/assets/D1A/DB0/sprockets%2F26d700197b8d25f954d56d8f31f2c8bc +0 -0
  21. data/spec/dummy/tmp/cache/assets/D32/A10/sprockets%2F13fe41fee1fe35b49d145bcc06610705 +0 -0
  22. data/spec/dummy/tmp/cache/assets/D5A/EA0/sprockets%2Fd771ace226fc8215a3572e0aa35bb0d6 +0 -0
  23. data/spec/dummy/tmp/cache/assets/DA4/EE0/sprockets%2Fcd39e3d56788faea331e0f5bac67329b +0 -0
  24. data/spec/dummy/tmp/cache/assets/DBD/220/sprockets%2F0cbff5c1a349439c1c444cbb4a57acc4 +0 -0
  25. data/spec/dummy/tmp/cache/assets/DDD/780/sprockets%2Fe7880b84c3ecb507fabc99b9ef6b70e3 +0 -0
  26. data/spec/dummy/tmp/cache/assets/DF8/310/sprockets%2Fccb12c4009c2f876d51dee8bae4c64ec +0 -0
data/README.md CHANGED
@@ -4,7 +4,7 @@ Copycat is a Rails engine that allows users to edit live website copy.
4
4
 
5
5
  ## How to use ##
6
6
 
7
- Add ```copycat``` to your Gemfile and run bundle.
7
+ Add ```copycat``` to your Gemfile and run ```bundle install```.
8
8
 
9
9
  Copycat uses a database table to store the copy items, and so it is necessary to create that:
10
10
 
@@ -52,6 +52,13 @@ Rails.application.routes.draw do
52
52
  end
53
53
  ```
54
54
 
55
+ ## Logging ##
56
+ Because Copycat does a SQL query for each token, it can produce a lot of noise in the log output. Therefore by default the logger is disabled for the Copycat ActiveRecord class. It can be enabled with the environment variable COPYCAT_DEBUG, e.g.
57
+
58
+ ```bash
59
+ COPYCAT_DEBUG=1 rails s
60
+ ```
61
+
55
62
  ## Example ##
56
63
 
57
64
  See an example application [here](https://github.com/Vermonster/copycat-demo).
@@ -1,5 +1,9 @@
1
1
  class CopycatTranslation < ActiveRecord::Base
2
2
 
3
+ unless ENV['COPYCAT_DEBUG']
4
+ self.logger = nil
5
+ end
6
+
3
7
  validates :key, :presence => true
4
8
  validates :locale, :presence => true
5
9
 
@@ -1,3 +1,3 @@
1
1
  module Copycat
2
- VERSION = "0.2.1"
2
+ VERSION = "0.2.2"
3
3
  end
@@ -1,5 +1,5 @@
1
1
  Copycat.setup do |config|
2
- config.username = 'c993116'
3
- config.password = '730eede'
2
+ config.username = 'admin'
3
+ config.password = 'password'
4
4
  #config.route = 'copycat_translations'
5
5
  end
Binary file
@@ -11,7 +11,7 @@
11
11
  #
12
12
  # It's strongly recommended to check this file into your version control system.
13
13
 
14
- ActiveRecord::Schema.define(:version => 20120320194234) do
14
+ ActiveRecord::Schema.define(:version => 20120407193855) do
15
15
 
16
16
  create_table "copycat_translations", :force => true do |t|
17
17
  t.string "locale"
Binary file