puntospoint 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore ADDED
@@ -0,0 +1,20 @@
1
+ *.gem
2
+ *.rbc
3
+ .bundle
4
+ .config
5
+ .yardoc
6
+ Gemfile.lock
7
+ InstalledFiles
8
+ _yardoc
9
+ coverage
10
+ doc/
11
+ lib/bundler/man
12
+ pkg
13
+ rdoc
14
+ spec/reports
15
+ test/tmp
16
+ test/version_tmp
17
+ tmp
18
+
19
+ # Rubymine Files
20
+ .idea/*
data/.idea/.name ADDED
@@ -0,0 +1 @@
1
+ puntospoint
data/.idea/.rakeTasks ADDED
@@ -0,0 +1,7 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <Settings><!--This file was automatically generated by Ruby plugin.
3
+ You are allowed to:
4
+ 1. Remove rake task
5
+ 2. Add existing rake tasks
6
+ To add existing rake tasks automatically delete this file and reload the project.
7
+ --><RakeGroup description="" fullCmd="" taksId="rake"><RakeTask description="Build puntospoint-0.0.1.gem into the pkg directory" fullCmd="build" taksId="build" /><RakeTask description="Build and install puntospoint-0.0.1.gem into system gems" fullCmd="install" taksId="install" /><RakeTask description="Create tag v0.0.1 and build and push puntospoint-0.0.1.gem to Rubygems" fullCmd="release" taksId="release" /></RakeGroup></Settings>
@@ -0,0 +1,5 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="Encoding" useUTFGuessing="true" native2AsciiForPropertiesFiles="false" />
4
+ </project>
5
+
data/.idea/misc.xml ADDED
@@ -0,0 +1,54 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="ProjectInspectionProfilesVisibleTreeState">
4
+ <entry key="Project Default">
5
+ <profile-state>
6
+ <expanded-state>
7
+ <State>
8
+ <id />
9
+ </State>
10
+ </expanded-state>
11
+ <selected-state>
12
+ <State>
13
+ <id>CoffeeScript</id>
14
+ </State>
15
+ </selected-state>
16
+ </profile-state>
17
+ </entry>
18
+ </component>
19
+ <component name="ProjectRootManager" version="2" project-jdk-name="rbenv: 1.9.3-p327" project-jdk-type="RUBY_SDK" />
20
+ <component name="SvnConfiguration" maxAnnotateRevisions="500" myUseAcceleration="nothing" myAutoUpdateAfterCommit="false" cleanupOnStartRun="false">
21
+ <option name="USER" value="" />
22
+ <option name="PASSWORD" value="" />
23
+ <option name="mySSHConnectionTimeout" value="30000" />
24
+ <option name="mySSHReadTimeout" value="30000" />
25
+ <option name="LAST_MERGED_REVISION" />
26
+ <option name="MERGE_DRY_RUN" value="false" />
27
+ <option name="MERGE_DIFF_USE_ANCESTRY" value="true" />
28
+ <option name="UPDATE_LOCK_ON_DEMAND" value="false" />
29
+ <option name="IGNORE_SPACES_IN_MERGE" value="false" />
30
+ <option name="DETECT_NESTED_COPIES" value="true" />
31
+ <option name="CHECK_NESTED_FOR_QUICK_MERGE" value="false" />
32
+ <option name="IGNORE_SPACES_IN_ANNOTATE" value="true" />
33
+ <option name="SHOW_MERGE_SOURCES_IN_ANNOTATE" value="true" />
34
+ <option name="FORCE_UPDATE" value="false" />
35
+ <option name="IGNORE_EXTERNALS" value="false" />
36
+ <myIsUseDefaultProxy>false</myIsUseDefaultProxy>
37
+ </component>
38
+ <component name="masterDetails">
39
+ <states>
40
+ <state key="ScopeChooserConfigurable.UI">
41
+ <settings>
42
+ <splitter-proportions>
43
+ <option name="proportions">
44
+ <list>
45
+ <option value="0.2" />
46
+ </list>
47
+ </option>
48
+ </splitter-proportions>
49
+ </settings>
50
+ </state>
51
+ </states>
52
+ </component>
53
+ </project>
54
+
data/.idea/modules.xml ADDED
@@ -0,0 +1,9 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="ProjectModuleManager">
4
+ <modules>
5
+ <module fileurl="file://$PROJECT_DIR$/.idea/puntospoint.iml" filepath="$PROJECT_DIR$/.idea/puntospoint.iml" />
6
+ </modules>
7
+ </component>
8
+ </project>
9
+
@@ -0,0 +1,5 @@
1
+ <component name="DependencyValidationManager">
2
+ <state>
3
+ <option name="SKIP_IMPORT_STATEMENTS" value="false" />
4
+ </state>
5
+ </component>
data/.idea/vcs.xml ADDED
@@ -0,0 +1,7 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="VcsDirectoryMappings">
4
+ <mapping directory="$PROJECT_DIR$" vcs="Git" />
5
+ </component>
6
+ </project>
7
+
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in puntospoint.gemspec
4
+ gemspec
data/LICENSE.txt ADDED
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2014 Ignacio Gajardo R.
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,29 @@
1
+ # Puntospoint
2
+
3
+ TODO: Write a gem description
4
+
5
+ ## Installation
6
+
7
+ Add this line to your application's Gemfile:
8
+
9
+ gem 'puntospoint'
10
+
11
+ And then execute:
12
+
13
+ $ bundle
14
+
15
+ Or install it yourself as:
16
+
17
+ $ gem install puntospoint
18
+
19
+ ## Usage
20
+
21
+ TODO: Write usage instructions here
22
+
23
+ ## Contributing
24
+
25
+ 1. Fork it ( http://github.com/<my-github-username>/puntospoint/fork )
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
data/Rakefile ADDED
@@ -0,0 +1 @@
1
+ require "bundler/gem_tasks"
@@ -0,0 +1,12 @@
1
+ development:
2
+ wsdl_url: "development wsdl url"
3
+ api_user: "api user"
4
+ api_password: "api password"
5
+ test:
6
+ wsdl_url: "test wsdl url"
7
+ api_user: "api user"
8
+ api_password: "api password"
9
+ production:
10
+ wsdl_url: "production wsdl url"
11
+ api_user: "api user"
12
+ api_password: "api password"
@@ -0,0 +1,7 @@
1
+ module Puntospoint
2
+ # Your code goes here...
3
+ end
4
+
5
+ require 'puntospoint/version'
6
+ require 'puntospoint/config'
7
+ require 'puntospoint/api'
@@ -0,0 +1,34 @@
1
+ module PuntosPoint
2
+ class Api
3
+ attr_reader :client
4
+
5
+ def initialize env
6
+ @env = env
7
+ @@config ||= PuntosPoint::Config.new(@env)
8
+ @@wsdl_url ||= @@config.wsdl_url
9
+ @client = Savon.client(wsdl: @@wsdl_url)
10
+ end
11
+
12
+ def get_events
13
+
14
+ end
15
+
16
+ def get_event(event_id)
17
+
18
+ end
19
+
20
+ def create_purchase(rut, email, exchange_id, references_codes)
21
+
22
+ end
23
+
24
+ def confirm_purchase(purchase_id)
25
+
26
+ end
27
+
28
+ def redeem_purchase(purchase_id)
29
+
30
+ end
31
+
32
+
33
+ end
34
+ end
@@ -0,0 +1,42 @@
1
+ require 'yaml'
2
+
3
+ module PuntosPoint
4
+ # Configuration variables wsdl_url, api user, api password
5
+ class Config
6
+ BASE_WSDL_URL = 'http://dev.puntospoint.com/api/cmr/events/wsdl'
7
+
8
+ attr_accessor :config_filepath, :wsdl_url, :api_user, :api_password
9
+
10
+ # Public: Loads the configuration file puntospoint.yml
11
+ # If it's a rails application it will take the file from the config/ directory
12
+ #
13
+ # env - Environment.
14
+ #
15
+ # Returns a Config object.
16
+ def initialize env = nil, config_override = nil
17
+ if env
18
+ # For non-rails apps
19
+ @config_filepath = File.join(File.dirname(__FILE__), "..", "..", "config", "puntospoint.yml")
20
+ load(env)
21
+ else
22
+ @config_filepath = File.join(Rails.root, "config", "puntospoint.yml")
23
+ load(Rails.env)
24
+ end
25
+ end
26
+
27
+ private
28
+
29
+ # Public: Initialize variables based on puntospoint.yml
30
+ #
31
+ # env - Environment.
32
+ #
33
+ # Returns nothing.
34
+ def load(env)
35
+ config = YAML.load_file(@config_filepath)[env]
36
+ @wsdl_url = config['wsdl_url'] || BASE_WSDL_URL
37
+ @api_user = config['api_user']
38
+ @api_password = config['api_password']
39
+ end
40
+
41
+ end
42
+ end
@@ -0,0 +1,3 @@
1
+ module Puntospoint
2
+ VERSION = "0.0.1"
3
+ end
@@ -0,0 +1,26 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'puntospoint/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = 'puntospoint'
8
+ spec.version = Puntospoint::VERSION
9
+ spec.authors = ['Ignacio Gajardo R.']
10
+ spec.email = ['ignacio.gajardo@junta.cl']
11
+ spec.summary = %q{Ruby wrapper for Puntos point api.}
12
+ spec.description = %q{Wrapper built over savon to use Puntos Point api.}
13
+ spec.homepage = ''
14
+ spec.license = 'MIT'
15
+
16
+ spec.files = `git ls-files -z`.split("\x0")
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 = ['lib']
20
+
21
+ spec.add_runtime_dependency 'savon', '~> 2.3.0'
22
+
23
+ spec.add_development_dependency 'bundler', '~> 1.5'
24
+ spec.add_development_dependency 'rake'
25
+ spec.add_development_dependency 'rspec'
26
+ end
metadata ADDED
@@ -0,0 +1,128 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: puntospoint
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Ignacio Gajardo R.
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2014-04-15 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: savon
16
+ requirement: !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ~>
20
+ - !ruby/object:Gem::Version
21
+ version: 2.3.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: 2.3.0
30
+ - !ruby/object:Gem::Dependency
31
+ name: bundler
32
+ requirement: !ruby/object:Gem::Requirement
33
+ none: false
34
+ requirements:
35
+ - - ~>
36
+ - !ruby/object:Gem::Version
37
+ version: '1.5'
38
+ type: :development
39
+ prerelease: false
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ~>
44
+ - !ruby/object:Gem::Version
45
+ version: '1.5'
46
+ - !ruby/object:Gem::Dependency
47
+ name: rake
48
+ requirement: !ruby/object:Gem::Requirement
49
+ none: false
50
+ requirements:
51
+ - - ! '>='
52
+ - !ruby/object:Gem::Version
53
+ version: '0'
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: '0'
62
+ - !ruby/object:Gem::Dependency
63
+ name: rspec
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
+ description: Wrapper built over savon to use Puntos Point api.
79
+ email:
80
+ - ignacio.gajardo@junta.cl
81
+ executables: []
82
+ extensions: []
83
+ extra_rdoc_files: []
84
+ files:
85
+ - .gitignore
86
+ - .idea/.name
87
+ - .idea/.rakeTasks
88
+ - .idea/encodings.xml
89
+ - .idea/misc.xml
90
+ - .idea/modules.xml
91
+ - .idea/scopes/scope_settings.xml
92
+ - .idea/vcs.xml
93
+ - Gemfile
94
+ - LICENSE.txt
95
+ - README.md
96
+ - Rakefile
97
+ - config/puntospoint.yml.example
98
+ - lib/puntospoint.rb
99
+ - lib/puntospoint/api.rb
100
+ - lib/puntospoint/config.rb
101
+ - lib/puntospoint/version.rb
102
+ - puntospoint.gemspec
103
+ homepage: ''
104
+ licenses:
105
+ - MIT
106
+ post_install_message:
107
+ rdoc_options: []
108
+ require_paths:
109
+ - lib
110
+ required_ruby_version: !ruby/object:Gem::Requirement
111
+ none: false
112
+ requirements:
113
+ - - ! '>='
114
+ - !ruby/object:Gem::Version
115
+ version: '0'
116
+ required_rubygems_version: !ruby/object:Gem::Requirement
117
+ none: false
118
+ requirements:
119
+ - - ! '>='
120
+ - !ruby/object:Gem::Version
121
+ version: '0'
122
+ requirements: []
123
+ rubyforge_project:
124
+ rubygems_version: 1.8.23
125
+ signing_key:
126
+ specification_version: 3
127
+ summary: Ruby wrapper for Puntos point api.
128
+ test_files: []