ruby-pennylane 0.1.0 → 1.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.idea/workspace.xml +59 -12
- data/.ruby-version +1 -0
- data/.travis.yml +1 -1
- data/Gemfile.lock +78 -0
- data/lib/ruby/pennylane/version.rb +1 -1
- data/lib/ruby/pennylane.rb +4 -3
- data/ruby-pennylane.gemspec +2 -2
- metadata +8 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f7434b23b2bd08be4c8bb72bb34f8a01deffd155bd43ca2ca18a91ef9785a634
|
4
|
+
data.tar.gz: 81fd7ec93e3703a6b7f8a7aefa5dc603080e01ba3634d2c572a37b43350938b5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7d2876de7fd6790138ef87680fa19199c0e929676f9cb92484f7506269659291c720ca37cb2be6097af5eecf48d7545ab717e51f59d9844e9c2322e393f7d404
|
7
|
+
data.tar.gz: 5177ba6c5c7513128fda0903d3c449d3723b223a795442c38078f0d4ccd610be9cc68d8c76f90aa5f282a00c68f535bac53eb1731fd8aada05b057bb5cf68ae3
|
data/.idea/workspace.xml
CHANGED
@@ -4,7 +4,11 @@
|
|
4
4
|
<option name="autoReloadType" value="SELECTIVE" />
|
5
5
|
</component>
|
6
6
|
<component name="ChangeListManager">
|
7
|
-
<list default="true" id="b8f3aa62-1507-4a8b-982b-cc3e15962c40" name="Changes" comment="
|
7
|
+
<list default="true" id="b8f3aa62-1507-4a8b-982b-cc3e15962c40" name="Changes" comment="Update pennylane.rb">
|
8
|
+
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
9
|
+
<change beforePath="$PROJECT_DIR$/lib/ruby/pennylane.rb" beforeDir="false" afterPath="$PROJECT_DIR$/lib/ruby/pennylane.rb" afterDir="false" />
|
10
|
+
<change beforePath="$PROJECT_DIR$/lib/ruby/pennylane/version.rb" beforeDir="false" afterPath="$PROJECT_DIR$/lib/ruby/pennylane/version.rb" afterDir="false" />
|
11
|
+
</list>
|
8
12
|
<option name="SHOW_DIALOG" value="false" />
|
9
13
|
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
10
14
|
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
|
@@ -26,13 +30,14 @@
|
|
26
30
|
<property name="RunOnceActivity.OpenProjectViewOnStart" value="true" />
|
27
31
|
<property name="RunOnceActivity.ShowReadmeOnStart" value="true" />
|
28
32
|
<property name="WebServerToolWindowFactoryState" value="false" />
|
33
|
+
<property name="last_opened_file_path" value="$PROJECT_DIR$" />
|
29
34
|
<property name="node.js.detected.package.eslint" value="true" />
|
30
35
|
<property name="node.js.detected.package.tslint" value="true" />
|
31
36
|
<property name="node.js.selected.package.eslint" value="(autodetect)" />
|
32
37
|
<property name="node.js.selected.package.tslint" value="(autodetect)" />
|
33
|
-
<property name="settings.editor.selected.configurable" value="
|
38
|
+
<property name="settings.editor.selected.configurable" value="configurable.group.language" />
|
34
39
|
</component>
|
35
|
-
<component name="RunManager">
|
40
|
+
<component name="RunManager" selected="Ruby.pennylane_spec">
|
36
41
|
<configuration name="pennylane_spec" type="RSpecRunConfigurationType" factoryName="RSpec" temporary="true" nameIsGenerated="true">
|
37
42
|
<module name="ruby-pennylane" />
|
38
43
|
<predefined_log_file enabled="true" id="RUBY_RSPEC" />
|
@@ -44,7 +49,7 @@
|
|
44
49
|
<envs>
|
45
50
|
<env name="JRUBY_OPTS" value="-X+O" />
|
46
51
|
</envs>
|
47
|
-
<EXTENSION ID="BundlerRunConfigurationExtension"
|
52
|
+
<EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="true" />
|
48
53
|
<EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
|
49
54
|
<EXTENSION ID="RubyCoverageRunConfigurationExtension" track_test_folders="true" runner="rcov" ENABLE_BRANCH_COVERAGE="true" ENABLE_FORKED_COVERAGE="true">
|
50
55
|
<COVERAGE_PATTERN ENABLED="true">
|
@@ -68,8 +73,27 @@
|
|
68
73
|
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="FULL_BACKTRACE" VALUE="false" />
|
69
74
|
<method v="2" />
|
70
75
|
</configuration>
|
76
|
+
<configuration name="pennylane_spec" type="RubyRunConfigurationType" factoryName="Ruby" temporary="true">
|
77
|
+
<RUBY_RUN_CONFIG NAME="RUBY_ARGS" VALUE="" />
|
78
|
+
<RUBY_RUN_CONFIG NAME="WORK DIR" VALUE="$PROJECT_DIR$/spec/ruby" />
|
79
|
+
<RUBY_RUN_CONFIG NAME="SHOULD_USE_SDK" VALUE="false" />
|
80
|
+
<RUBY_RUN_CONFIG NAME="ALTERN_SDK_NAME" VALUE="" />
|
81
|
+
<RUBY_RUN_CONFIG NAME="myPassParentEnvs" VALUE="true" />
|
82
|
+
<EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="false" />
|
83
|
+
<EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
|
84
|
+
<EXTENSION ID="RubyCoverageRunConfigurationExtension" track_test_folders="true" runner="rcov" ENABLE_BRANCH_COVERAGE="true" ENABLE_FORKED_COVERAGE="true">
|
85
|
+
<COVERAGE_PATTERN ENABLED="true">
|
86
|
+
<PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
|
87
|
+
</COVERAGE_PATTERN>
|
88
|
+
</EXTENSION>
|
89
|
+
<EXTENSION ID="org.jetbrains.plugins.ruby.rails.run.RailsRunConfigurationExtension" SCRATCH_USE_RAILS_RUNNER="false" />
|
90
|
+
<RUBY_RUN_CONFIG NAME="SCRIPT_PATH" VALUE="$PROJECT_DIR$/spec/ruby/pennylane_spec.rb" />
|
91
|
+
<RUBY_RUN_CONFIG NAME="SCRIPT_ARGS" VALUE="" />
|
92
|
+
<method v="2" />
|
93
|
+
</configuration>
|
71
94
|
<recent_temporary>
|
72
95
|
<list>
|
96
|
+
<item itemvalue="Ruby.pennylane_spec" />
|
73
97
|
<item itemvalue="RSpec.pennylane_spec" />
|
74
98
|
</list>
|
75
99
|
</recent_temporary>
|
@@ -83,16 +107,37 @@
|
|
83
107
|
<option name="number" value="Default" />
|
84
108
|
<option name="presentableId" value="Default" />
|
85
109
|
<updated>1639742622881</updated>
|
86
|
-
<workItem from="1639742624060" duration="
|
110
|
+
<workItem from="1639742624060" duration="1075000" />
|
111
|
+
<workItem from="1641545075966" duration="18000" />
|
112
|
+
<workItem from="1641545118530" duration="121000" />
|
113
|
+
<workItem from="1641546038127" duration="196000" />
|
114
|
+
<workItem from="1641798480071" duration="9000" />
|
115
|
+
<workItem from="1643818294066" duration="1050000" />
|
116
|
+
<workItem from="1643892973999" duration="9000" />
|
117
|
+
<workItem from="1643893009912" duration="888000" />
|
87
118
|
</task>
|
88
|
-
<task id="LOCAL-00001" summary="
|
89
|
-
<created>
|
119
|
+
<task id="LOCAL-00001" summary="Update travis">
|
120
|
+
<created>1641546064332</created>
|
90
121
|
<option name="number" value="00001" />
|
91
122
|
<option name="presentableId" value="LOCAL-00001" />
|
92
123
|
<option name="project" value="LOCAL" />
|
93
|
-
<updated>
|
124
|
+
<updated>1641546064332</updated>
|
125
|
+
</task>
|
126
|
+
<task id="LOCAL-00002" summary="Update pennylane.rb">
|
127
|
+
<created>1643818532803</created>
|
128
|
+
<option name="number" value="00002" />
|
129
|
+
<option name="presentableId" value="LOCAL-00002" />
|
130
|
+
<option name="project" value="LOCAL" />
|
131
|
+
<updated>1643818532803</updated>
|
132
|
+
</task>
|
133
|
+
<task id="LOCAL-00003" summary="Update pennylane.rb">
|
134
|
+
<created>1643893082181</created>
|
135
|
+
<option name="number" value="00003" />
|
136
|
+
<option name="presentableId" value="LOCAL-00003" />
|
137
|
+
<option name="project" value="LOCAL" />
|
138
|
+
<updated>1643893082181</updated>
|
94
139
|
</task>
|
95
|
-
<option name="localTasksCounter" value="
|
140
|
+
<option name="localTasksCounter" value="4" />
|
96
141
|
<servers />
|
97
142
|
</component>
|
98
143
|
<component name="TypeScriptGeneratedFilesManager">
|
@@ -108,12 +153,14 @@
|
|
108
153
|
</entry>
|
109
154
|
</map>
|
110
155
|
</option>
|
156
|
+
<option name="oldMeFiltersMigrated" value="true" />
|
111
157
|
</component>
|
112
158
|
<component name="VcsManagerConfiguration">
|
113
|
-
<MESSAGE value="
|
114
|
-
<
|
159
|
+
<MESSAGE value="Update travis" />
|
160
|
+
<MESSAGE value="Update pennylane.rb" />
|
161
|
+
<option name="LAST_COMMIT_MESSAGE" value="Update pennylane.rb" />
|
115
162
|
</component>
|
116
163
|
<component name="com.intellij.coverage.CoverageDataManagerImpl">
|
117
|
-
<SUITE FILE_PATH="coverage/ruby_pennylane@pennylane_spec.rcov" NAME="pennylane_spec Coverage Results" MODIFIED="
|
164
|
+
<SUITE FILE_PATH="coverage/ruby_pennylane@pennylane_spec.rcov" NAME="pennylane_spec Coverage Results" MODIFIED="1639746525971" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="rcov" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" MODULE_NAME="ruby-pennylane" />
|
118
165
|
</component>
|
119
166
|
</project>
|
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
3.1.0
|
data/.travis.yml
CHANGED
data/Gemfile.lock
ADDED
@@ -0,0 +1,78 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
ruby-pennylane (0.1.0)
|
5
|
+
activesupport (~> 7.0)
|
6
|
+
httparty (~> 0.18)
|
7
|
+
rake (~> 13.0)
|
8
|
+
rspec (~> 3.0)
|
9
|
+
rubocop (~> 1.7)
|
10
|
+
|
11
|
+
GEM
|
12
|
+
remote: https://rubygems.org/
|
13
|
+
specs:
|
14
|
+
activesupport (7.0.1)
|
15
|
+
concurrent-ruby (~> 1.0, >= 1.0.2)
|
16
|
+
i18n (>= 1.6, < 2)
|
17
|
+
minitest (>= 5.1)
|
18
|
+
tzinfo (~> 2.0)
|
19
|
+
ast (2.4.2)
|
20
|
+
concurrent-ruby (1.1.9)
|
21
|
+
diff-lcs (1.5.0)
|
22
|
+
httparty (0.20.0)
|
23
|
+
mime-types (~> 3.0)
|
24
|
+
multi_xml (>= 0.5.2)
|
25
|
+
i18n (1.8.11)
|
26
|
+
concurrent-ruby (~> 1.0)
|
27
|
+
mime-types (3.4.1)
|
28
|
+
mime-types-data (~> 3.2015)
|
29
|
+
mime-types-data (3.2022.0105)
|
30
|
+
minitest (5.15.0)
|
31
|
+
multi_xml (0.6.0)
|
32
|
+
parallel (1.21.0)
|
33
|
+
parser (3.1.0.0)
|
34
|
+
ast (~> 2.4.1)
|
35
|
+
rainbow (3.0.0)
|
36
|
+
rake (13.0.6)
|
37
|
+
regexp_parser (2.2.0)
|
38
|
+
rexml (3.2.5)
|
39
|
+
rspec (3.10.0)
|
40
|
+
rspec-core (~> 3.10.0)
|
41
|
+
rspec-expectations (~> 3.10.0)
|
42
|
+
rspec-mocks (~> 3.10.0)
|
43
|
+
rspec-core (3.10.1)
|
44
|
+
rspec-support (~> 3.10.0)
|
45
|
+
rspec-expectations (3.10.1)
|
46
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
47
|
+
rspec-support (~> 3.10.0)
|
48
|
+
rspec-mocks (3.10.2)
|
49
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
50
|
+
rspec-support (~> 3.10.0)
|
51
|
+
rspec-support (3.10.3)
|
52
|
+
rubocop (1.24.1)
|
53
|
+
parallel (~> 1.10)
|
54
|
+
parser (>= 3.0.0.0)
|
55
|
+
rainbow (>= 2.2.2, < 4.0)
|
56
|
+
regexp_parser (>= 1.8, < 3.0)
|
57
|
+
rexml
|
58
|
+
rubocop-ast (>= 1.15.1, < 2.0)
|
59
|
+
ruby-progressbar (~> 1.7)
|
60
|
+
unicode-display_width (>= 1.4.0, < 3.0)
|
61
|
+
rubocop-ast (1.15.1)
|
62
|
+
parser (>= 3.0.1.1)
|
63
|
+
ruby-progressbar (1.11.0)
|
64
|
+
tzinfo (2.0.4)
|
65
|
+
concurrent-ruby (~> 1.0)
|
66
|
+
unicode-display_width (2.1.0)
|
67
|
+
|
68
|
+
PLATFORMS
|
69
|
+
x86_64-linux
|
70
|
+
|
71
|
+
DEPENDENCIES
|
72
|
+
rake (~> 13.0)
|
73
|
+
rspec (~> 3.0)
|
74
|
+
rubocop (~> 1.7)
|
75
|
+
ruby-pennylane!
|
76
|
+
|
77
|
+
BUNDLED WITH
|
78
|
+
2.3.3
|
data/lib/ruby/pennylane.rb
CHANGED
@@ -2,6 +2,7 @@
|
|
2
2
|
|
3
3
|
require_relative "pennylane/version"
|
4
4
|
require "httparty"
|
5
|
+
require 'active_support/isolated_execution_state'
|
5
6
|
require "active_support/core_ext/module"
|
6
7
|
require "active_support/core_ext/object"
|
7
8
|
|
@@ -23,13 +24,13 @@ module Ruby
|
|
23
24
|
|
24
25
|
attr_accessor :token
|
25
26
|
|
26
|
-
def initialize(
|
27
|
+
def initialize(args = {})
|
27
28
|
@token ||= args.fetch(:token, Rails.configuration.pennylane_token)
|
28
29
|
end
|
29
30
|
|
30
31
|
# call(method: :get, element: customers, id: 3, filter: [{"field": "customer_id", "operator": "eq", "value": "4c02116c-1793-4e3d-becf-6870ef12d441"}], body: { elem: { } })
|
31
32
|
# method: :get by default
|
32
|
-
def call(
|
33
|
+
def call(args)
|
33
34
|
return {error: :missing_argument, status: :unprocessable_entity}.as_json unless args[:element]
|
34
35
|
|
35
36
|
http_method(args)
|
@@ -37,7 +38,7 @@ module Ruby
|
|
37
38
|
|
38
39
|
private
|
39
40
|
|
40
|
-
def http_method(
|
41
|
+
def http_method(args = {})
|
41
42
|
self.class.headers(Authorization: "Bearer #{@token || args[:token]}")
|
42
43
|
# See https://ruby-doc.org/core-3.0.2/String.html#method-i-25
|
43
44
|
url = Pennylane.url[:v1] % {
|
data/ruby-pennylane.gemspec
CHANGED
@@ -12,7 +12,7 @@ Gem::Specification.new do |spec|
|
|
12
12
|
spec.description = "Pennylane is a finance platform"
|
13
13
|
spec.homepage = "https://github.com/eddygarcas/ruby-pennylane"
|
14
14
|
spec.license = "MIT"
|
15
|
-
spec.required_ruby_version = Gem::Requirement.new(">=
|
15
|
+
spec.required_ruby_version = Gem::Requirement.new(">= 3.1.0")
|
16
16
|
|
17
17
|
spec.metadata["allowed_push_host"] = "https://rubygems.org/"
|
18
18
|
|
@@ -35,7 +35,7 @@ Gem::Specification.new do |spec|
|
|
35
35
|
spec.add_dependency "rake", "~> 13.0"
|
36
36
|
spec.add_dependency "rspec", "~> 3.0"
|
37
37
|
spec.add_dependency "rubocop", "~> 1.7"
|
38
|
-
spec.add_dependency "activesupport", "~>
|
38
|
+
spec.add_dependency "activesupport", "~> 7.0"
|
39
39
|
|
40
40
|
# For more information and examples about making a new gem, checkout our
|
41
41
|
# guide at: https://bundler.io/guides/creating_gem.html
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby-pennylane
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 1.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eduard Garcia Castelló
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-02-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httparty
|
@@ -72,14 +72,14 @@ dependencies:
|
|
72
72
|
requirements:
|
73
73
|
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: '
|
75
|
+
version: '7.0'
|
76
76
|
type: :runtime
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: '
|
82
|
+
version: '7.0'
|
83
83
|
description: Pennylane is a finance platform
|
84
84
|
email:
|
85
85
|
- edugarcas@gmail.com
|
@@ -92,10 +92,12 @@ files:
|
|
92
92
|
- ".idea/workspace.xml"
|
93
93
|
- ".rspec"
|
94
94
|
- ".rubocop.yml"
|
95
|
+
- ".ruby-version"
|
95
96
|
- ".travis.yml"
|
96
97
|
- CHANGELOG.md
|
97
98
|
- CODE_OF_CONDUCT.md
|
98
99
|
- Gemfile
|
100
|
+
- Gemfile.lock
|
99
101
|
- LICENSE.txt
|
100
102
|
- README.md
|
101
103
|
- Rakefile
|
@@ -120,14 +122,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
120
122
|
requirements:
|
121
123
|
- - ">="
|
122
124
|
- !ruby/object:Gem::Version
|
123
|
-
version:
|
125
|
+
version: 3.1.0
|
124
126
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
125
127
|
requirements:
|
126
128
|
- - ">="
|
127
129
|
- !ruby/object:Gem::Version
|
128
130
|
version: '0'
|
129
131
|
requirements: []
|
130
|
-
rubygems_version: 3.
|
132
|
+
rubygems_version: 3.3.3
|
131
133
|
signing_key:
|
132
134
|
specification_version: 4
|
133
135
|
summary: Ruby Pennylane gem
|