unp_smart 0.1.3 → 0.1.4
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.
- checksums.yaml +4 -4
- data/Gemfile.lock +3 -3
- data/bin/unpsmart +1 -1
- data/lib/unp_smart/unp_smart_method.rb +4 -4
- data/lib/unp_smart/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f0a5c384aff43664f39121b949491ebae2614c81
|
4
|
+
data.tar.gz: 02e8d044dc1661f4622cb4fb3867f786be4108f4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4b18ae2a1c334ed88e7dc29a2c9e64703bdcd4aeca0c52f6b95dbcd64628c86c5a5ed3cc13affaebc43e57f2686ec5294a1ed1c0988ac90da941fb43a7daf27b
|
7
|
+
data.tar.gz: 8da9aadc62ebd1b67812dd57e04924347416ec77c1ceb49de98abce3a87aff391720a12cdfc35d0139ea3c64e09dc7018a4155845ce282246b77f4b3a0ed61a2
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,9 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
unp_smart (0.1.
|
4
|
+
unp_smart (0.1.3)
|
5
|
+
activesupport (~> 4.1)
|
6
|
+
rest-client (~> 1.7)
|
5
7
|
|
6
8
|
GEM
|
7
9
|
remote: https://rubygems.org/
|
@@ -42,9 +44,7 @@ PLATFORMS
|
|
42
44
|
ruby
|
43
45
|
|
44
46
|
DEPENDENCIES
|
45
|
-
activesupport (~> 4.1)
|
46
47
|
bundler (~> 1.6)
|
47
48
|
rake (~> 10.4)
|
48
|
-
rest-client (~> 1.7)
|
49
49
|
rspec (~> 3.1)
|
50
50
|
unp_smart!
|
data/bin/unpsmart
CHANGED
@@ -105,8 +105,8 @@ module UnpSmart
|
|
105
105
|
log "config file path",path
|
106
106
|
@config ||= YAML.load_file(path)[current_env]
|
107
107
|
log "config:#{@config}" if @verbose
|
108
|
-
|
109
|
-
|
108
|
+
rescue => e
|
109
|
+
log "load config error:#{e.inspect}"
|
110
110
|
end
|
111
111
|
|
112
112
|
private
|
@@ -117,7 +117,7 @@ module UnpSmart
|
|
117
117
|
end
|
118
118
|
|
119
119
|
def get_variable_from_params key
|
120
|
-
@params[key.to_sym]
|
120
|
+
@params[key.to_sym] if @params.present?
|
121
121
|
end
|
122
122
|
|
123
123
|
def get_variable_from_env key
|
@@ -145,7 +145,7 @@ module UnpSmart
|
|
145
145
|
end
|
146
146
|
|
147
147
|
def current_env
|
148
|
-
rails_app? ? Rails.env : 'development'
|
148
|
+
rails_app? ? Rails.env : (ENV['UNPSMART_ENV'].presence||'development')
|
149
149
|
end
|
150
150
|
|
151
151
|
def rails_app?
|
data/lib/unp_smart/version.rb
CHANGED