acfs 0.2.0
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.
- data/.gitignore +21 -0
- data/.rspec +2 -0
- data/.travis.yml +10 -0
- data/Gemfile +4 -0
- data/Guardfile +24 -0
- data/LICENSE.txt +22 -0
- data/README.md +60 -0
- data/Rakefile +6 -0
- data/acfs.gemspec +29 -0
- data/gemfiles/Gemfile.rails-3-1 +7 -0
- data/gemfiles/Gemfile.rails-3-2 +7 -0
- data/gemfiles/Gemfile.rails-head +7 -0
- data/lib/acfs.rb +14 -0
- data/lib/acfs/attributes.rb +105 -0
- data/lib/acfs/attributes/integer.rb +15 -0
- data/lib/acfs/attributes/string.rb +15 -0
- data/lib/acfs/client.rb +15 -0
- data/lib/acfs/initialization.rb +38 -0
- data/lib/acfs/model.rb +22 -0
- data/lib/acfs/version.rb +12 -0
- data/spec/attributes_spec.rb +101 -0
- data/spec/client_spec.rb +12 -0
- data/spec/initialization_spec.rb +22 -0
- data/spec/spec_helper.rb +26 -0
- data/spec/support/my_client.rb +12 -0
- metadata +194 -0
data/.gitignore
ADDED
data/.rspec
ADDED
data/.travis.yml
ADDED
data/Gemfile
ADDED
data/Guardfile
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
# A sample Guardfile
|
2
|
+
# More info at https://github.com/guard/guard#readme
|
3
|
+
|
4
|
+
guard 'rspec' do
|
5
|
+
watch(%r{^spec/.+_spec\.rb$})
|
6
|
+
watch(%r{^lib/(.+)\.rb$}) { |m| "spec/lib/#{m[1]}_spec.rb" }
|
7
|
+
watch('spec/spec_helper.rb') { "spec" }
|
8
|
+
|
9
|
+
# Rails example
|
10
|
+
watch(%r{^app/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
|
11
|
+
watch(%r{^app/(.*)(\.erb|\.haml)$}) { |m| "spec/#{m[1]}#{m[2]}_spec.rb" }
|
12
|
+
watch(%r{^app/controllers/(.+)_(controller)\.rb$}) { |m| ["spec/routing/#{m[1]}_routing_spec.rb", "spec/#{m[2]}s/#{m[1]}_#{m[2]}_spec.rb", "spec/acceptance/#{m[1]}_spec.rb"] }
|
13
|
+
watch(%r{^spec/support/(.+)\.rb$}) { "spec" }
|
14
|
+
watch('config/routes.rb') { "spec/routing" }
|
15
|
+
watch('app/controllers/application_controller.rb') { "spec/controllers" }
|
16
|
+
|
17
|
+
# Capybara features specs
|
18
|
+
watch(%r{^app/views/(.+)/.*\.(erb|haml)$}) { |m| "spec/features/#{m[1]}_spec.rb" }
|
19
|
+
|
20
|
+
# Turnip features and steps
|
21
|
+
watch(%r{^spec/acceptance/(.+)\.feature$})
|
22
|
+
watch(%r{^spec/acceptance/steps/(.+)_steps\.rb$}) { |m| Dir[File.join("**/#{m[1]}.feature")][0] || 'spec/acceptance' }
|
23
|
+
end
|
24
|
+
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2013 Jan Graichen
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,60 @@
|
|
1
|
+
# Acfs - *API Client for Services*
|
2
|
+
|
3
|
+
[](http://badge.fury.io/rb/acfs) [](https://travis-ci.org/jgraichen/acfs) [](https://coveralls.io/r/jgraichen/acfs) [](https://codeclimate.com/github/jgraichen/acfs) [](https://gemnasium.com/jgraichen/acfs)
|
4
|
+
|
5
|
+
TODO: Develop asynchronous parallel API client library for service oriented applications.
|
6
|
+
|
7
|
+
TODO: Write a gem description
|
8
|
+
|
9
|
+
## Installation
|
10
|
+
|
11
|
+
Add this line to your application's Gemfile:
|
12
|
+
|
13
|
+
gem 'acfs'
|
14
|
+
|
15
|
+
And then execute:
|
16
|
+
|
17
|
+
$ bundle
|
18
|
+
|
19
|
+
Or install it yourself as:
|
20
|
+
|
21
|
+
$ gem install acfs
|
22
|
+
|
23
|
+
## Usage
|
24
|
+
|
25
|
+
TODO: Write usage instructions here
|
26
|
+
|
27
|
+
### Acfs::Attributes
|
28
|
+
|
29
|
+
```ruby
|
30
|
+
class MyModel
|
31
|
+
include Acfs::Attributes
|
32
|
+
|
33
|
+
attribute :name, :string
|
34
|
+
attribute :age, :integer, default: 15
|
35
|
+
end
|
36
|
+
|
37
|
+
MyModel.attributes # => { "name" => "", "age" => 15 }
|
38
|
+
|
39
|
+
mo = MyModel.new name: 'Johnny', age: 12
|
40
|
+
mo.name # => "Johnny"
|
41
|
+
mo.age = '13'
|
42
|
+
mo.age # => 13
|
43
|
+
mo.attributes # => { "name" => "Johnny", "age" => 13 }
|
44
|
+
|
45
|
+
```
|
46
|
+
|
47
|
+
## TODO
|
48
|
+
|
49
|
+
* Library Code
|
50
|
+
* Documentation
|
51
|
+
|
52
|
+
## Contributing
|
53
|
+
|
54
|
+
1. Fork it
|
55
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
56
|
+
3. Add specs for your feature
|
57
|
+
4. Implement your feature
|
58
|
+
5. Commit your changes (`git commit -am 'Add some feature'`)
|
59
|
+
6. Push to the branch (`git push origin my-new-feature`)
|
60
|
+
7. Create new Pull Request
|
data/Rakefile
ADDED
data/acfs.gemspec
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'acfs/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "acfs"
|
8
|
+
spec.version = Acfs::VERSION
|
9
|
+
spec.authors = ['Jan Graichen']
|
10
|
+
spec.email = %w(jg@altimos.de)
|
11
|
+
spec.description = %q{API Client For Services}
|
12
|
+
spec.summary = %q{An abstract API base client for service oriented application.}
|
13
|
+
spec.homepage = ""
|
14
|
+
spec.license = "MIT"
|
15
|
+
|
16
|
+
spec.files = `git ls-files`.split($/)
|
17
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
18
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
|
+
spec.require_paths = %w(lib)
|
20
|
+
|
21
|
+
spec.add_runtime_dependency 'activesupport'
|
22
|
+
spec.add_runtime_dependency 'activemodel'
|
23
|
+
|
24
|
+
spec.add_development_dependency 'bundler', '~> 1.3'
|
25
|
+
spec.add_development_dependency 'rake'
|
26
|
+
spec.add_development_dependency 'rspec'
|
27
|
+
spec.add_development_dependency 'guard-rspec'
|
28
|
+
spec.add_development_dependency 'coveralls'
|
29
|
+
end
|
data/lib/acfs.rb
ADDED
@@ -0,0 +1,105 @@
|
|
1
|
+
module Acfs
|
2
|
+
|
3
|
+
# == Acfs Attribute
|
4
|
+
#
|
5
|
+
# Allows to specify attributes of a class with default values and type safety.
|
6
|
+
#
|
7
|
+
# class User
|
8
|
+
# include Acfs::Attributes
|
9
|
+
#
|
10
|
+
# attribute :name, :string, default: 'Anon'
|
11
|
+
# attribute :age, :integer
|
12
|
+
# attribute :special, My::Special::Type
|
13
|
+
# end
|
14
|
+
#
|
15
|
+
# For each attribute a setter and getter will be created and values will be
|
16
|
+
# type casted when set.
|
17
|
+
#
|
18
|
+
module Attributes
|
19
|
+
def self.included(base) # :nodoc:
|
20
|
+
base.class_eval do
|
21
|
+
extend ClassMethods
|
22
|
+
include InstanceMethods
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
module InstanceMethods # :nodoc:
|
27
|
+
|
28
|
+
def initialize(*attrs) # :nodoc:
|
29
|
+
self.class.attributes.each { |k, v| send :"#{k}=", v }
|
30
|
+
super
|
31
|
+
end
|
32
|
+
|
33
|
+
# Returns ActiveModel compatible list of attributes and values.
|
34
|
+
#
|
35
|
+
# class User
|
36
|
+
# attribute :name, type: String, default: 'Anon'
|
37
|
+
# end
|
38
|
+
# user = User.new(name: 'John')
|
39
|
+
# user.attributes # => { "name" => "John" }
|
40
|
+
#
|
41
|
+
def attributes
|
42
|
+
self.class.attributes.keys.inject({}) { |h, k| h[k.to_s] = send k; h }
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
module ClassMethods # :nodoc:
|
47
|
+
|
48
|
+
# Define a model attribute by name and type. Will create getter and
|
49
|
+
# setter for given attribute name. Existing methods will be overridden.
|
50
|
+
#
|
51
|
+
# class User
|
52
|
+
# attribute :name, type: String, default: 'Anon'
|
53
|
+
# end
|
54
|
+
#
|
55
|
+
# Available types can be found in `Acfs::Attributes::*`.
|
56
|
+
#
|
57
|
+
def attribute(*attrs)
|
58
|
+
opts = attrs.extract_options!
|
59
|
+
type = opts.delete(:type) || :string
|
60
|
+
|
61
|
+
if type.is_a? Symbol or type.is_a? String
|
62
|
+
type = "::Acfs::Attributes::#{type.to_s.classify}".constantize
|
63
|
+
end
|
64
|
+
|
65
|
+
attrs.each do |attr|
|
66
|
+
define_attribute attr.to_sym, type, opts
|
67
|
+
end
|
68
|
+
end
|
69
|
+
|
70
|
+
# Return list of possible attributes and default values for this model class.
|
71
|
+
#
|
72
|
+
# class User
|
73
|
+
# attribute :name, String
|
74
|
+
# attribute :age, Integer, default: 25
|
75
|
+
# end
|
76
|
+
# User.attributes # => { "name": nil, "age": 25 }
|
77
|
+
#
|
78
|
+
def attributes
|
79
|
+
@attributes ||= {}
|
80
|
+
end
|
81
|
+
|
82
|
+
|
83
|
+
private
|
84
|
+
def define_attribute(name, type, opts = {}) # :nodoc:
|
85
|
+
@attributes ||= {}
|
86
|
+
@attributes[name] = type.cast opts.has_key?(:default) ? opts[:default] : nil
|
87
|
+
|
88
|
+
self.send :define_method, name do
|
89
|
+
instance_variable_get :"@#{name}"
|
90
|
+
end
|
91
|
+
|
92
|
+
self.send :define_method, :"#{name}=" do |value|
|
93
|
+
instance_variable_set :"@#{name}", type.cast(value)
|
94
|
+
end
|
95
|
+
end
|
96
|
+
end
|
97
|
+
end
|
98
|
+
end
|
99
|
+
|
100
|
+
# Load attribute type classes.
|
101
|
+
#
|
102
|
+
Dir[File.dirname(__FILE__) + "/attributes/*.rb"].sort.each do |path|
|
103
|
+
filename = File.basename(path)
|
104
|
+
require "acfs/attributes/#{filename}"
|
105
|
+
end
|
data/lib/acfs/client.rb
ADDED
@@ -0,0 +1,38 @@
|
|
1
|
+
module Acfs
|
2
|
+
module Initialization
|
3
|
+
|
4
|
+
# Initializes a new model with the given +params+.
|
5
|
+
#
|
6
|
+
# class User
|
7
|
+
# include Acfs::Model
|
8
|
+
# attribute :name
|
9
|
+
# attribute :email, default: -> { "#{name}@dom.tld" }
|
10
|
+
# attribute :age, :integer, default: 18
|
11
|
+
# end
|
12
|
+
#
|
13
|
+
# user = User.new(name: 'bob')
|
14
|
+
# user.name # => "bob"
|
15
|
+
# user.email # => "bob@dom.tld"
|
16
|
+
# user.age # => 18
|
17
|
+
#
|
18
|
+
def initialize(params={})
|
19
|
+
params.each do |attr, value|
|
20
|
+
self.public_send("#{attr}=", value)
|
21
|
+
end if params
|
22
|
+
end
|
23
|
+
|
24
|
+
# Indicates if the model is persisted. Default is +false+.
|
25
|
+
#
|
26
|
+
# class User
|
27
|
+
# include Acfs::Model
|
28
|
+
# attribute :name
|
29
|
+
# end
|
30
|
+
#
|
31
|
+
# user = User.new(name: 'bob')
|
32
|
+
# user.persisted? # => false
|
33
|
+
#
|
34
|
+
def persisted?
|
35
|
+
false
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
data/lib/acfs/model.rb
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
require 'active_model'
|
2
|
+
|
3
|
+
module Acfs
|
4
|
+
module Model
|
5
|
+
def self.included(base)
|
6
|
+
base.class_eval do
|
7
|
+
if ActiveModel::VERSION::MAJOR >= 4
|
8
|
+
include ActiveModel::Model
|
9
|
+
else
|
10
|
+
extend ActiveModel::Naming
|
11
|
+
extend ActiveModel::Translation
|
12
|
+
include ActiveModel::Conversion
|
13
|
+
include ActiveModel::Validations
|
14
|
+
|
15
|
+
include Acfs::Initialization
|
16
|
+
end
|
17
|
+
|
18
|
+
include Acfs::Attributes
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
data/lib/acfs/version.rb
ADDED
@@ -0,0 +1,101 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Acfs::Attributes do
|
4
|
+
let(:model) { Class.new(MyModel) }
|
5
|
+
|
6
|
+
describe '#initialize' do
|
7
|
+
before { model.send :attribute, :name, default: 'John' }
|
8
|
+
|
9
|
+
it 'should have attribute list' do
|
10
|
+
expect(model.new.attributes).to include('name')
|
11
|
+
end
|
12
|
+
|
13
|
+
it 'should set default attributes' do
|
14
|
+
expect(model.new.name).to be == 'John'
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
describe '#attributes' do
|
19
|
+
before do
|
20
|
+
model.send :attribute, :name, default: 'John'
|
21
|
+
model.send :attribute, :age, type: :integer, default: 25
|
22
|
+
end
|
23
|
+
|
24
|
+
it 'should return hash of all attributes' do
|
25
|
+
expect(model.new.attributes).to be == {
|
26
|
+
'name' => 'John',
|
27
|
+
'age' => 25
|
28
|
+
}
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
describe '#_getter_' do
|
33
|
+
before { model.send :attribute, :name, default: 'John' }
|
34
|
+
|
35
|
+
it 'should return value' do
|
36
|
+
expect(model.new(name: 'Paul').name).to be == 'Paul'
|
37
|
+
end
|
38
|
+
|
39
|
+
it 'should return default value' do
|
40
|
+
expect(model.new.name).to be == 'John'
|
41
|
+
end
|
42
|
+
|
43
|
+
it 'should return matching ivar\'s value' do
|
44
|
+
o = model.new
|
45
|
+
o.instance_variable_set :@name, 'Johannes'
|
46
|
+
|
47
|
+
expect(o.name).to be == 'Johannes'
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
51
|
+
describe '#_setter_' do
|
52
|
+
before { model.send :attribute, :name, default: 'John' }
|
53
|
+
|
54
|
+
it 'should set value' do
|
55
|
+
o = model.new
|
56
|
+
o.name = 'Paul'
|
57
|
+
|
58
|
+
expect(o.name).to be == 'Paul'
|
59
|
+
end
|
60
|
+
|
61
|
+
it 'should set instance var' do
|
62
|
+
o = model.new
|
63
|
+
o.name = 'Paul'
|
64
|
+
|
65
|
+
expect(o.instance_variable_get(:@name)).to be == 'Paul'
|
66
|
+
end
|
67
|
+
|
68
|
+
it 'should update attributes hash' do
|
69
|
+
o = model.new
|
70
|
+
o.name = 'Johannes'
|
71
|
+
|
72
|
+
expect(o.attributes['name']).to be == 'Johannes'
|
73
|
+
end
|
74
|
+
end
|
75
|
+
|
76
|
+
describe '.attribute' do
|
77
|
+
it 'should add an attribute to model attribute list' do
|
78
|
+
model.send :attribute, :name
|
79
|
+
|
80
|
+
expect(model.attributes).to be == { :name => '' }
|
81
|
+
end
|
82
|
+
|
83
|
+
it 'should accept a default value' do
|
84
|
+
model.send :attribute, :name, default: 'John'
|
85
|
+
|
86
|
+
expect(model.attributes).to be == { :name => 'John' }
|
87
|
+
end
|
88
|
+
|
89
|
+
it 'should accept an symbolic type' do
|
90
|
+
model.send :attribute, :age, type: :integer, default: '12'
|
91
|
+
|
92
|
+
expect(model.attributes).to be == { :age => 12 }
|
93
|
+
end
|
94
|
+
|
95
|
+
it 'should accept an class type' do
|
96
|
+
model.send :attribute, :age, type: Acfs::Attributes::Integer, default: '12'
|
97
|
+
|
98
|
+
expect(model.attributes).to be == { :age => 12 }
|
99
|
+
end
|
100
|
+
end
|
101
|
+
end
|
data/spec/client_spec.rb
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Acfs::Initialization do
|
4
|
+
let(:model) { MyModel }
|
5
|
+
|
6
|
+
describe '#initialize' do
|
7
|
+
it 'should allow to set attributes with initializer' do
|
8
|
+
model = MyModel.new(name: "John")
|
9
|
+
expect(model.name).to be == "John"
|
10
|
+
end
|
11
|
+
|
12
|
+
it 'should raise error when attributes with private setters are given' do
|
13
|
+
expect { MyModel.new(age: 25) }.to raise_error(NoMethodError)
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
describe '#persisted?' do
|
18
|
+
it 'should be false' do
|
19
|
+
expect(MyModel.new.persisted?).to be_false
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,26 @@
|
|
1
|
+
require 'acfs'
|
2
|
+
require 'coveralls'
|
3
|
+
Coveralls.wear!
|
4
|
+
|
5
|
+
Dir[File.expand_path('spec/support/**/*.rb')].each {|f| require f}
|
6
|
+
|
7
|
+
RSpec.configure do |config|
|
8
|
+
# ## Mock Framework
|
9
|
+
#
|
10
|
+
# If you prefer to use mocha, flexmock or RR, uncomment the appropriate line:
|
11
|
+
#
|
12
|
+
# config.mock_with :mocha
|
13
|
+
# config.mock_with :flexmock
|
14
|
+
# config.mock_with :rr
|
15
|
+
|
16
|
+
# Run specs in random order to surface order dependencies. If you find an
|
17
|
+
# order dependency and want to debug it, you can fix the order by providing
|
18
|
+
# the seed, which is printed after each run.
|
19
|
+
# --seed 1234
|
20
|
+
config.order = "random"
|
21
|
+
|
22
|
+
config.expect_with :rspec do |c|
|
23
|
+
# Only allow expect syntax
|
24
|
+
c.syntax = :expect
|
25
|
+
end
|
26
|
+
end
|
metadata
ADDED
@@ -0,0 +1,194 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: acfs
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.2.0
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Jan Graichen
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2013-03-19 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: activesupport
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - '>='
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '0'
|
22
|
+
type: :runtime
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - '>='
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '0'
|
30
|
+
- !ruby/object:Gem::Dependency
|
31
|
+
name: activemodel
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
33
|
+
none: false
|
34
|
+
requirements:
|
35
|
+
- - '>='
|
36
|
+
- !ruby/object:Gem::Version
|
37
|
+
version: '0'
|
38
|
+
type: :runtime
|
39
|
+
prerelease: false
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - '>='
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: '0'
|
46
|
+
- !ruby/object:Gem::Dependency
|
47
|
+
name: bundler
|
48
|
+
requirement: !ruby/object:Gem::Requirement
|
49
|
+
none: false
|
50
|
+
requirements:
|
51
|
+
- - ~>
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: '1.3'
|
54
|
+
type: :development
|
55
|
+
prerelease: false
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
58
|
+
requirements:
|
59
|
+
- - ~>
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '1.3'
|
62
|
+
- !ruby/object:Gem::Dependency
|
63
|
+
name: rake
|
64
|
+
requirement: !ruby/object:Gem::Requirement
|
65
|
+
none: false
|
66
|
+
requirements:
|
67
|
+
- - '>='
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: '0'
|
70
|
+
type: :development
|
71
|
+
prerelease: false
|
72
|
+
version_requirements: !ruby/object:Gem::Requirement
|
73
|
+
none: false
|
74
|
+
requirements:
|
75
|
+
- - '>='
|
76
|
+
- !ruby/object:Gem::Version
|
77
|
+
version: '0'
|
78
|
+
- !ruby/object:Gem::Dependency
|
79
|
+
name: rspec
|
80
|
+
requirement: !ruby/object:Gem::Requirement
|
81
|
+
none: false
|
82
|
+
requirements:
|
83
|
+
- - '>='
|
84
|
+
- !ruby/object:Gem::Version
|
85
|
+
version: '0'
|
86
|
+
type: :development
|
87
|
+
prerelease: false
|
88
|
+
version_requirements: !ruby/object:Gem::Requirement
|
89
|
+
none: false
|
90
|
+
requirements:
|
91
|
+
- - '>='
|
92
|
+
- !ruby/object:Gem::Version
|
93
|
+
version: '0'
|
94
|
+
- !ruby/object:Gem::Dependency
|
95
|
+
name: guard-rspec
|
96
|
+
requirement: !ruby/object:Gem::Requirement
|
97
|
+
none: false
|
98
|
+
requirements:
|
99
|
+
- - '>='
|
100
|
+
- !ruby/object:Gem::Version
|
101
|
+
version: '0'
|
102
|
+
type: :development
|
103
|
+
prerelease: false
|
104
|
+
version_requirements: !ruby/object:Gem::Requirement
|
105
|
+
none: false
|
106
|
+
requirements:
|
107
|
+
- - '>='
|
108
|
+
- !ruby/object:Gem::Version
|
109
|
+
version: '0'
|
110
|
+
- !ruby/object:Gem::Dependency
|
111
|
+
name: coveralls
|
112
|
+
requirement: !ruby/object:Gem::Requirement
|
113
|
+
none: false
|
114
|
+
requirements:
|
115
|
+
- - '>='
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
none: false
|
122
|
+
requirements:
|
123
|
+
- - '>='
|
124
|
+
- !ruby/object:Gem::Version
|
125
|
+
version: '0'
|
126
|
+
description: API Client For Services
|
127
|
+
email:
|
128
|
+
- jg@altimos.de
|
129
|
+
executables: []
|
130
|
+
extensions: []
|
131
|
+
extra_rdoc_files: []
|
132
|
+
files:
|
133
|
+
- .gitignore
|
134
|
+
- .rspec
|
135
|
+
- .travis.yml
|
136
|
+
- Gemfile
|
137
|
+
- Guardfile
|
138
|
+
- LICENSE.txt
|
139
|
+
- README.md
|
140
|
+
- Rakefile
|
141
|
+
- acfs.gemspec
|
142
|
+
- gemfiles/Gemfile.rails-3-1
|
143
|
+
- gemfiles/Gemfile.rails-3-2
|
144
|
+
- gemfiles/Gemfile.rails-head
|
145
|
+
- lib/acfs.rb
|
146
|
+
- lib/acfs/attributes.rb
|
147
|
+
- lib/acfs/attributes/integer.rb
|
148
|
+
- lib/acfs/attributes/string.rb
|
149
|
+
- lib/acfs/client.rb
|
150
|
+
- lib/acfs/initialization.rb
|
151
|
+
- lib/acfs/model.rb
|
152
|
+
- lib/acfs/version.rb
|
153
|
+
- spec/attributes_spec.rb
|
154
|
+
- spec/client_spec.rb
|
155
|
+
- spec/initialization_spec.rb
|
156
|
+
- spec/spec_helper.rb
|
157
|
+
- spec/support/my_client.rb
|
158
|
+
homepage: ''
|
159
|
+
licenses:
|
160
|
+
- MIT
|
161
|
+
post_install_message:
|
162
|
+
rdoc_options: []
|
163
|
+
require_paths:
|
164
|
+
- lib
|
165
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
166
|
+
none: false
|
167
|
+
requirements:
|
168
|
+
- - '>='
|
169
|
+
- !ruby/object:Gem::Version
|
170
|
+
version: '0'
|
171
|
+
segments:
|
172
|
+
- 0
|
173
|
+
hash: 956482736488803723
|
174
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
175
|
+
none: false
|
176
|
+
requirements:
|
177
|
+
- - '>='
|
178
|
+
- !ruby/object:Gem::Version
|
179
|
+
version: '0'
|
180
|
+
segments:
|
181
|
+
- 0
|
182
|
+
hash: 956482736488803723
|
183
|
+
requirements: []
|
184
|
+
rubyforge_project:
|
185
|
+
rubygems_version: 1.8.25
|
186
|
+
signing_key:
|
187
|
+
specification_version: 3
|
188
|
+
summary: An abstract API base client for service oriented application.
|
189
|
+
test_files:
|
190
|
+
- spec/attributes_spec.rb
|
191
|
+
- spec/client_spec.rb
|
192
|
+
- spec/initialization_spec.rb
|
193
|
+
- spec/spec_helper.rb
|
194
|
+
- spec/support/my_client.rb
|