whisk-rails 0.2.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -0
- data/gemfiles/rails3.2.gemfile.lock +1 -1
- data/gemfiles/rails4.0.gemfile.lock +1 -1
- data/lib/whisk/logger.rb +19 -0
- data/lib/whisk/odinson.rb +1 -1
- data/lib/whisk/rails.rb +1 -0
- data/lib/whisk/version.rb +1 -1
- data/lib/whisk.rb +14 -0
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ba5f1b022f3d278a5f22778fe6f6311242c97e0f
|
4
|
+
data.tar.gz: d58d595789093a379333ea4c96881a9002c06464
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 383e5945ce883f0370ef2b1be80da8e27710ff73def13adda0cd4692840b9180b0710086d4ceaff30556bb24f6221fd36525304ee629d618dbf1167bbd09e57b
|
7
|
+
data.tar.gz: 88dcae5495864be37ee175ef14dc637bf66930da17c0ad9c130fd96456e214d20a69ed1e23fc792eebe902899cc2e75a1dda0b673f686e8270b11cf5ea320cd9
|
data/README.md
CHANGED
@@ -8,6 +8,8 @@
|
|
8
8
|
|
9
9
|
Welcome to whisk.
|
10
10
|
|
11
|
+
A gem we use @[Hoppinger](www.hoppinger.com) in order to scramble our data. whisk-rails uses the faker gem in order to generate random data to be used whilst scrambling.
|
12
|
+
|
11
13
|
## Installation
|
12
14
|
|
13
15
|
Add this line to your application's Gemfile:
|
data/lib/whisk/logger.rb
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
module Whisk
|
2
|
+
module Logger
|
3
|
+
class << self
|
4
|
+
attr_writer :logger
|
5
|
+
end
|
6
|
+
|
7
|
+
def log(message)
|
8
|
+
logger.info("[whisk-rails] #{message}") if logging?
|
9
|
+
end
|
10
|
+
|
11
|
+
def logger
|
12
|
+
@logger ||= options[:logger] || ::Logger.new(STDOUT)
|
13
|
+
end
|
14
|
+
|
15
|
+
def logging?
|
16
|
+
options[:log]
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
data/lib/whisk/odinson.rb
CHANGED
@@ -31,7 +31,7 @@ module Whisk
|
|
31
31
|
end
|
32
32
|
|
33
33
|
def conf
|
34
|
-
YAML.load_file("#{ENV['RAILS_ENV'] == 'test' ? 'spec/fixtures/' : ''
|
34
|
+
YAML.load_file("#{ENV['RAILS_ENV'] == 'test' ? 'spec/fixtures/' : ''}.whisk.yml")
|
35
35
|
rescue
|
36
36
|
raise Errno::ENOENT, '.whisk.yml not found'
|
37
37
|
end
|
data/lib/whisk/rails.rb
CHANGED
data/lib/whisk/version.rb
CHANGED
data/lib/whisk.rb
CHANGED
@@ -1,7 +1,21 @@
|
|
1
1
|
require 'faker'
|
2
|
+
require 'logger'
|
2
3
|
|
3
4
|
require 'whisk/rails'
|
4
5
|
require 'whisk/version'
|
6
|
+
require 'whisk/logger'
|
5
7
|
|
6
8
|
module Whisk
|
9
|
+
extend Logger
|
10
|
+
|
11
|
+
class << self
|
12
|
+
attr_writer :logger
|
13
|
+
end
|
14
|
+
|
15
|
+
def self.options
|
16
|
+
@options ||= {
|
17
|
+
log: true,
|
18
|
+
logger: nil
|
19
|
+
}
|
20
|
+
end
|
7
21
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: whisk-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dunya Kirkali
|
@@ -151,6 +151,7 @@ files:
|
|
151
151
|
- gemfiles/rails4.0.gemfile
|
152
152
|
- gemfiles/rails4.0.gemfile.lock
|
153
153
|
- lib/whisk.rb
|
154
|
+
- lib/whisk/logger.rb
|
154
155
|
- lib/whisk/odinson.rb
|
155
156
|
- lib/whisk/rails.rb
|
156
157
|
- lib/whisk/rails/railtie.rb
|