moip_assinaturas 0.0.1

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 ADDED
@@ -0,0 +1,18 @@
1
+ *.gem
2
+ *.rbc
3
+ .bundle
4
+ .config
5
+ coverage
6
+ InstalledFiles
7
+ lib/bundler/man
8
+ pkg
9
+ rdoc
10
+ spec/reports
11
+ test/tmp
12
+ test/version_tmp
13
+ tmp
14
+
15
+ # YARD artifacts
16
+ .yardoc
17
+ _yardoc
18
+ doc/
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in moip_assinaturas.gemspec
4
+ gemspec
data/Gemfile.lock ADDED
@@ -0,0 +1,53 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ moip_assinaturas (0.0.1)
5
+ activemodel (~> 3.2.11)
6
+ httparty (~> 0.10.0)
7
+
8
+ GEM
9
+ remote: https://rubygems.org/
10
+ specs:
11
+ activemodel (3.2.11)
12
+ activesupport (= 3.2.11)
13
+ builder (~> 3.0.0)
14
+ activesupport (3.2.11)
15
+ i18n (~> 0.6)
16
+ multi_json (~> 1.0)
17
+ addressable (2.3.2)
18
+ ansi (1.4.3)
19
+ builder (3.0.4)
20
+ crack (0.3.2)
21
+ git (1.2.5)
22
+ httparty (0.10.0)
23
+ multi_json (~> 1.0)
24
+ multi_xml
25
+ i18n (0.6.1)
26
+ jeweler (1.8.4)
27
+ bundler (~> 1.0)
28
+ git (>= 1.2.5)
29
+ rake
30
+ rdoc
31
+ json (1.7.6)
32
+ multi_json (1.5.0)
33
+ multi_xml (0.5.2)
34
+ rake (10.0.3)
35
+ rdoc (3.12)
36
+ json (~> 1.4)
37
+ turn (0.9.6)
38
+ ansi
39
+ vcr (2.4.0)
40
+ webmock (1.9.0)
41
+ addressable (>= 2.2.7)
42
+ crack (>= 0.1.7)
43
+
44
+ PLATFORMS
45
+ ruby
46
+
47
+ DEPENDENCIES
48
+ bundler (~> 1.2.3)
49
+ jeweler (~> 1.8.4)
50
+ moip_assinaturas!
51
+ turn (~> 0.9.6)
52
+ vcr (~> 2.4.0)
53
+ webmock (~> 1.9.0)
data/LICENSE.txt ADDED
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2013 Raphael Costa
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,30 @@
1
+ # Moip::Assinaturas
2
+
3
+ TODO: Write a gem description
4
+
5
+ ## Installation
6
+
7
+ Add this line to your application's Gemfile:
8
+
9
+ gem 'moip_assinaturas'
10
+
11
+ And then execute:
12
+
13
+ $ bundle
14
+
15
+ Or install it yourself as:
16
+
17
+ $ gem install moip_assinaturas
18
+
19
+ ## Usage
20
+
21
+ TODO: Write usage instructions here
22
+
23
+ ## Contributing
24
+
25
+ 1. Fork it
26
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
27
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
28
+ 4. Push to the branch (`git push origin my-new-feature`)
29
+ 5. Create new Pull Request
30
+
data/Rakefile ADDED
@@ -0,0 +1,8 @@
1
+ require "bundler/gem_tasks"
2
+
3
+ require 'rake/testtask'
4
+ Rake::TestTask.new do |t|
5
+ t.test_files = FileList['spec/lib/moip_assinaturas/*_spec.rb']
6
+ t.verbose = true
7
+ end
8
+ task :default => :test
@@ -0,0 +1,26 @@
1
+ require "moip_assinaturas/version"
2
+ require "httparty"
3
+ require "active_model"
4
+ require 'logger'
5
+
6
+ module MoipAssinaturas
7
+ class << self
8
+ attr_accessor :api_token, :api_key, :sandbox, :logger
9
+
10
+ def api_url
11
+ if sandbox
12
+ "https://sandbox.moip.com.br/assinaturas/v1"
13
+ else
14
+ "https://www.moip.com.br/assinaturas/v1"
15
+ end
16
+ end
17
+
18
+ end
19
+ end
20
+
21
+ Dir[File.dirname(__FILE__) + '/moip_assinaturas/*.rb'].each do |file|
22
+ require file
23
+ end
24
+
25
+ MoipAssinaturas.sandbox = false
26
+ MoipAssinaturas.logger = Logger.new(STDOUT)
@@ -0,0 +1,12 @@
1
+ require "rails/generators/base"
2
+
3
+ module MoipAssinaturas
4
+ class InstallGenerator < ::Rails::Generators::Base
5
+ namespace "moip_assinaturas:install"
6
+ source_root File.dirname(__FILE__) + "/../../templates"
7
+
8
+ def copy_configuration_file
9
+ copy_file "config.yml", "config/moip_assinaturas.yml"
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,5 @@
1
+ module MoipAssinaturas
2
+ class Planos << MoipAssinaturas::Request
3
+
4
+ end
5
+ end
@@ -0,0 +1,7 @@
1
+ module MoipAssinaturas
2
+ class Railtie < Rails::Railtie
3
+ generators do
4
+ require "moip_assinaturas/generator"
5
+ end
6
+ end
7
+ end
@@ -0,0 +1,12 @@
1
+ module MoipAssinaturas
2
+ class Request
3
+ include HTTParty
4
+ base_uri MoipAssinaturas.api_url
5
+
6
+ def initialize
7
+ @auth = {username: MoipAssinaturas.api_token , password: MoipAssinaturas.api_key}
8
+ end
9
+
10
+
11
+ end
12
+ end
@@ -0,0 +1,3 @@
1
+ module MoipAssinaturas
2
+ VERSION = "0.0.1"
3
+ end
@@ -0,0 +1,30 @@
1
+ # -*- encoding: utf-8 -*-
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'moip_assinaturas/version'
5
+
6
+ Gem::Specification.new do |gem|
7
+ gem.name = "moip_assinaturas"
8
+ gem.version = MoipAssinaturas::VERSION
9
+ gem.authors = ["Raphael Costa"]
10
+ gem.email = ["raphael@raphaelcosta.net"]
11
+ gem.summary = %q{Oficial gem of MoIP Assinaturas}
12
+ gem.description = gem.summary
13
+ gem.licenses = ["MIT"]
14
+ gem.homepage = "http://github.com/raphaelcosta/moip_assinaturas"
15
+
16
+ gem.files = `git ls-files`.split($/)
17
+ gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
18
+ gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
19
+ gem.require_paths = ["lib"]
20
+
21
+ gem.add_runtime_dependency "httparty","~> 0.10.0"
22
+ gem.add_runtime_dependency "activemodel", "~> 3.2.11"
23
+
24
+ gem.add_development_dependency "bundler", "~> 1.2.3"
25
+ gem.add_development_dependency "jeweler", "~> 1.8.4"
26
+ gem.add_development_dependency "turn", "~> 0.9.6"
27
+ gem.add_development_dependency "vcr", "~> 2.4.0"
28
+ gem.add_development_dependency "webmock", "~> 1.9.0"
29
+
30
+ end
@@ -0,0 +1,18 @@
1
+ require_relative '../lib/moip_assinaturas.rb'
2
+
3
+ require 'minitest/autorun'
4
+ require 'webmock/minitest'
5
+ require 'vcr'
6
+ require 'turn'
7
+
8
+ Turn.config do |c|
9
+ c.format = :outline
10
+ c.trace = true
11
+ c.natural = true
12
+ end
13
+
14
+ #VCR config
15
+ VCR.config do |c|
16
+ c.cassette_library_dir = 'spec/fixtures/dish_cassettes'
17
+ c.stub_with :webmock
18
+ end
@@ -0,0 +1,11 @@
1
+ development: &development
2
+ token: ""
3
+ key: ""
4
+ sandbox: true
5
+
6
+ test:
7
+ <<: *development
8
+
9
+ production:
10
+ token: ""
11
+ key: ""
metadata ADDED
@@ -0,0 +1,174 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: moip_assinaturas
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Raphael Costa
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2013-01-13 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: httparty
16
+ prerelease: false
17
+ requirement: !ruby/object:Gem::Requirement
18
+ requirements:
19
+ - - ~>
20
+ - !ruby/object:Gem::Version
21
+ version: 0.10.0
22
+ none: false
23
+ type: :runtime
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ requirements:
26
+ - - ~>
27
+ - !ruby/object:Gem::Version
28
+ version: 0.10.0
29
+ none: false
30
+ - !ruby/object:Gem::Dependency
31
+ name: activemodel
32
+ prerelease: false
33
+ requirement: !ruby/object:Gem::Requirement
34
+ requirements:
35
+ - - ~>
36
+ - !ruby/object:Gem::Version
37
+ version: 3.2.11
38
+ none: false
39
+ type: :runtime
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ requirements:
42
+ - - ~>
43
+ - !ruby/object:Gem::Version
44
+ version: 3.2.11
45
+ none: false
46
+ - !ruby/object:Gem::Dependency
47
+ name: bundler
48
+ prerelease: false
49
+ requirement: !ruby/object:Gem::Requirement
50
+ requirements:
51
+ - - ~>
52
+ - !ruby/object:Gem::Version
53
+ version: 1.2.3
54
+ none: false
55
+ type: :development
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ requirements:
58
+ - - ~>
59
+ - !ruby/object:Gem::Version
60
+ version: 1.2.3
61
+ none: false
62
+ - !ruby/object:Gem::Dependency
63
+ name: jeweler
64
+ prerelease: false
65
+ requirement: !ruby/object:Gem::Requirement
66
+ requirements:
67
+ - - ~>
68
+ - !ruby/object:Gem::Version
69
+ version: 1.8.4
70
+ none: false
71
+ type: :development
72
+ version_requirements: !ruby/object:Gem::Requirement
73
+ requirements:
74
+ - - ~>
75
+ - !ruby/object:Gem::Version
76
+ version: 1.8.4
77
+ none: false
78
+ - !ruby/object:Gem::Dependency
79
+ name: turn
80
+ prerelease: false
81
+ requirement: !ruby/object:Gem::Requirement
82
+ requirements:
83
+ - - ~>
84
+ - !ruby/object:Gem::Version
85
+ version: 0.9.6
86
+ none: false
87
+ type: :development
88
+ version_requirements: !ruby/object:Gem::Requirement
89
+ requirements:
90
+ - - ~>
91
+ - !ruby/object:Gem::Version
92
+ version: 0.9.6
93
+ none: false
94
+ - !ruby/object:Gem::Dependency
95
+ name: vcr
96
+ prerelease: false
97
+ requirement: !ruby/object:Gem::Requirement
98
+ requirements:
99
+ - - ~>
100
+ - !ruby/object:Gem::Version
101
+ version: 2.4.0
102
+ none: false
103
+ type: :development
104
+ version_requirements: !ruby/object:Gem::Requirement
105
+ requirements:
106
+ - - ~>
107
+ - !ruby/object:Gem::Version
108
+ version: 2.4.0
109
+ none: false
110
+ - !ruby/object:Gem::Dependency
111
+ name: webmock
112
+ prerelease: false
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - ~>
116
+ - !ruby/object:Gem::Version
117
+ version: 1.9.0
118
+ none: false
119
+ type: :development
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - ~>
123
+ - !ruby/object:Gem::Version
124
+ version: 1.9.0
125
+ none: false
126
+ description: Oficial gem of MoIP Assinaturas
127
+ email:
128
+ - raphael@raphaelcosta.net
129
+ executables: []
130
+ extensions: []
131
+ extra_rdoc_files: []
132
+ files:
133
+ - .gitignore
134
+ - Gemfile
135
+ - Gemfile.lock
136
+ - LICENSE.txt
137
+ - README.md
138
+ - Rakefile
139
+ - lib/moip_assinaturas.rb
140
+ - lib/moip_assinaturas/generator.rb
141
+ - lib/moip_assinaturas/models/planos.rb
142
+ - lib/moip_assinaturas/railtie.rb
143
+ - lib/moip_assinaturas/request.rb
144
+ - lib/moip_assinaturas/version.rb
145
+ - moip_assinaturas.gemspec
146
+ - spec/spec_helper.rb
147
+ - templates/config.yml
148
+ homepage: http://github.com/raphaelcosta/moip_assinaturas
149
+ licenses:
150
+ - MIT
151
+ post_install_message:
152
+ rdoc_options: []
153
+ require_paths:
154
+ - lib
155
+ required_ruby_version: !ruby/object:Gem::Requirement
156
+ requirements:
157
+ - - ! '>='
158
+ - !ruby/object:Gem::Version
159
+ version: '0'
160
+ none: false
161
+ required_rubygems_version: !ruby/object:Gem::Requirement
162
+ requirements:
163
+ - - ! '>='
164
+ - !ruby/object:Gem::Version
165
+ version: '0'
166
+ none: false
167
+ requirements: []
168
+ rubyforge_project:
169
+ rubygems_version: 1.8.24
170
+ signing_key:
171
+ specification_version: 3
172
+ summary: Oficial gem of MoIP Assinaturas
173
+ test_files:
174
+ - spec/spec_helper.rb