light-services 0.4.0 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.codeclimate.yml +2 -2
- data/.rubocop.yml +9 -1152
- data/.ruby-gemset +1 -0
- data/.ruby-version +1 -1
- data/.travis.yml +21 -9
- data/Appraisals +6 -1
- data/Gemfile +2 -0
- data/README.md +109 -6
- data/Rakefile +2 -0
- data/bin/console +1 -0
- data/gemfiles/rails_4_0.gemfile +1 -1
- data/gemfiles/rails_4_0.gemfile.lock +2 -2
- data/gemfiles/rails_4_1.gemfile +1 -1
- data/gemfiles/rails_4_1.gemfile.lock +2 -2
- data/gemfiles/rails_4_2.gemfile +1 -1
- data/gemfiles/rails_4_2.gemfile.lock +2 -2
- data/gemfiles/rails_5_0.gemfile +2 -2
- data/gemfiles/rails_5_0.gemfile.lock +80 -86
- data/gemfiles/rails_5_1.gemfile +7 -0
- data/gemfiles/rails_5_1.gemfile.lock +150 -0
- data/lib/light/services/base.rb +5 -4
- data/lib/light/services/callbacks.rb +18 -15
- data/lib/light/services/exceptions.rb +2 -0
- data/lib/light/services/messages.rb +9 -5
- data/lib/light/services/outputs.rb +64 -0
- data/lib/light/services/parameters.rb +40 -50
- data/lib/light/services/version.rb +3 -1
- data/lib/light/services.rb +3 -1
- data/light-services.gemspec +2 -0
- metadata +7 -4
- data/lib/light/services/variables.rb +0 -38
data/lib/light/services.rb
CHANGED
@@ -1,8 +1,10 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'light/services/version'
|
2
4
|
require 'light/services/exceptions'
|
3
5
|
require 'light/services/messages'
|
4
|
-
require 'light/services/variables'
|
5
6
|
require 'light/services/parameters'
|
7
|
+
require 'light/services/outputs'
|
6
8
|
require 'light/services/callbacks'
|
7
9
|
require 'light/services/base'
|
8
10
|
|
data/light-services.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: light-services
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Emelianenko
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-08-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -119,6 +119,7 @@ files:
|
|
119
119
|
- ".gitignore"
|
120
120
|
- ".rspec"
|
121
121
|
- ".rubocop.yml"
|
122
|
+
- ".ruby-gemset"
|
122
123
|
- ".ruby-version"
|
123
124
|
- ".travis.yml"
|
124
125
|
- Appraisals
|
@@ -137,13 +138,15 @@ files:
|
|
137
138
|
- gemfiles/rails_4_2.gemfile.lock
|
138
139
|
- gemfiles/rails_5_0.gemfile
|
139
140
|
- gemfiles/rails_5_0.gemfile.lock
|
141
|
+
- gemfiles/rails_5_1.gemfile
|
142
|
+
- gemfiles/rails_5_1.gemfile.lock
|
140
143
|
- lib/light/services.rb
|
141
144
|
- lib/light/services/base.rb
|
142
145
|
- lib/light/services/callbacks.rb
|
143
146
|
- lib/light/services/exceptions.rb
|
144
147
|
- lib/light/services/messages.rb
|
148
|
+
- lib/light/services/outputs.rb
|
145
149
|
- lib/light/services/parameters.rb
|
146
|
-
- lib/light/services/variables.rb
|
147
150
|
- lib/light/services/version.rb
|
148
151
|
- light-services.gemspec
|
149
152
|
homepage: https://github.com/light-ruby/light-services
|
@@ -166,7 +169,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
166
169
|
version: '0'
|
167
170
|
requirements: []
|
168
171
|
rubyforge_project:
|
169
|
-
rubygems_version: 2.6.
|
172
|
+
rubygems_version: 2.6.12
|
170
173
|
signing_key:
|
171
174
|
specification_version: 4
|
172
175
|
summary: Light pattern Services Object for Ruby/Rails
|
@@ -1,38 +0,0 @@
|
|
1
|
-
module Light
|
2
|
-
module Services
|
3
|
-
class Variables
|
4
|
-
def initialize
|
5
|
-
@storage = {}
|
6
|
-
end
|
7
|
-
|
8
|
-
def add(key, variable)
|
9
|
-
@storage[key] = variable
|
10
|
-
end
|
11
|
-
|
12
|
-
def get(key)
|
13
|
-
@storage[key]
|
14
|
-
end
|
15
|
-
|
16
|
-
def delete(key)
|
17
|
-
@storage.delete(key)
|
18
|
-
end
|
19
|
-
|
20
|
-
def blank?
|
21
|
-
@storage.empty?
|
22
|
-
end
|
23
|
-
|
24
|
-
def any?
|
25
|
-
!blank?
|
26
|
-
end
|
27
|
-
|
28
|
-
def to_hash
|
29
|
-
@storage
|
30
|
-
end
|
31
|
-
|
32
|
-
private
|
33
|
-
|
34
|
-
# Getters/Setters
|
35
|
-
attr_accessor :storage
|
36
|
-
end
|
37
|
-
end
|
38
|
-
end
|