pin_up 0.7.5 → 0.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.idea/pin_up.iml +114 -1
- data/.idea/workspace.xml +193 -76
- data/README.md +1 -45
- data/VERSION +1 -1
- data/lib/pin_up.rb +0 -1
- data/lib/pin_up/pin_errors.rb +7 -3
- data/pin_up.gemspec +3 -5
- data/spec/errors_spec.rb +13 -0
- data/spec/refund_spec.rb +3 -10
- data/spec/spec_helper.rb +1 -1
- metadata +2 -4
- data/lib/pin_up/receipt.rb +0 -65
- data/spec/receipt_spec.rb +0 -37
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 443129ce02dcb74ce9fac5f568228d39090f9e84
|
4
|
+
data.tar.gz: 8fbe0e57fd99f55f21379ca3e47269e4cc5b3afe
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5f75b8cb2214b78f17a2e58b5bbc52ce12be7a23f8b1a37ad33e8e3c00a5f1dbf1da25fb41af8d8403fb32edca40a00942b795851ac33754b85aa503bcdabf4c
|
7
|
+
data.tar.gz: 350101146621a862fc32c0b8ba831069445395f569fb23decd0dde354571146f62123b7e0ae21c778e14f280c10d1be10d8c52bbadf1d2b7eeab92d81bfed7dd
|
data/.idea/pin_up.iml
CHANGED
@@ -9,6 +9,100 @@
|
|
9
9
|
</configuration>
|
10
10
|
</facet>
|
11
11
|
</component>
|
12
|
+
<component name="ModuleRunConfigurationManager">
|
13
|
+
<configuration default="false" name="All specs in: pin_up" type="RSpecRunConfigurationType" factoryName="RSpec" temporary="true">
|
14
|
+
<predefined_log_file id="RUBY_RSPEC" enabled="true" />
|
15
|
+
<module name="pin_up" />
|
16
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
|
17
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="$MODULE_DIR$" />
|
18
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
|
19
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
|
20
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
|
21
|
+
<envs>
|
22
|
+
<env name="JRUBY_OPTS" value="-X+O" />
|
23
|
+
</envs>
|
24
|
+
<EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="true" />
|
25
|
+
<EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
|
26
|
+
<EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov">
|
27
|
+
<COVERAGE_PATTERN ENABLED="true">
|
28
|
+
<PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
|
29
|
+
</COVERAGE_PATTERN>
|
30
|
+
</EXTENSION>
|
31
|
+
<EXTENSION ID="org.jetbrains.plugins.ruby.motion.run.MotionSimulatorRunExtension" />
|
32
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TESTS_FOLDER_PATH" VALUE="$MODULE_DIR$" />
|
33
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_SCRIPT_PATH" VALUE="" />
|
34
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_RUNNER_PATH" VALUE="" />
|
35
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_FILE_MASK" VALUE="**/*_spec.rb" />
|
36
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_EXAMPLE_NAME" VALUE="" />
|
37
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_TEST_TYPE" VALUE="ALL_IN_FOLDER" />
|
38
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_ARGS" VALUE="" />
|
39
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="RUNNER_VERSION" VALUE="" />
|
40
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="USE_CUSTOM_SPEC_RUNNER" VALUE="false" />
|
41
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="DRB" VALUE="false" />
|
42
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="ZEUS" VALUE="false" />
|
43
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="FULL_BACKTRACE" VALUE="false" />
|
44
|
+
<RunnerSettings RunnerId="RubyRunner" />
|
45
|
+
<ConfigurationWrapper RunnerId="RubyRunner" />
|
46
|
+
<method />
|
47
|
+
</configuration>
|
48
|
+
<configuration default="false" name="spec_helper" type="RubyRunConfigurationType" factoryName="Ruby" temporary="true">
|
49
|
+
<module name="pin_up" />
|
50
|
+
<RUBY_RUN_CONFIG NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
|
51
|
+
<RUBY_RUN_CONFIG NAME="WORK DIR" VALUE="$MODULE_DIR$/spec" />
|
52
|
+
<RUBY_RUN_CONFIG NAME="SHOULD_USE_SDK" VALUE="false" />
|
53
|
+
<RUBY_RUN_CONFIG NAME="ALTERN_SDK_NAME" VALUE="" />
|
54
|
+
<RUBY_RUN_CONFIG NAME="myPassParentEnvs" VALUE="true" />
|
55
|
+
<envs />
|
56
|
+
<EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="true" />
|
57
|
+
<EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
|
58
|
+
<EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov">
|
59
|
+
<COVERAGE_PATTERN ENABLED="true">
|
60
|
+
<PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
|
61
|
+
</COVERAGE_PATTERN>
|
62
|
+
</EXTENSION>
|
63
|
+
<EXTENSION ID="org.jetbrains.plugins.ruby.motion.run.MotionSimulatorRunExtension" />
|
64
|
+
<RUBY_RUN_CONFIG NAME="SCRIPT_PATH" VALUE="$MODULE_DIR$/spec/spec_helper.rb" />
|
65
|
+
<RUBY_RUN_CONFIG NAME="SCRIPT_ARGS" VALUE="" />
|
66
|
+
<RunnerSettings RunnerId="RubyCover" />
|
67
|
+
<RunnerSettings RunnerId="RubyRunner" />
|
68
|
+
<ConfigurationWrapper RunnerId="RubyCover" />
|
69
|
+
<ConfigurationWrapper RunnerId="RubyRunner" />
|
70
|
+
<method />
|
71
|
+
</configuration>
|
72
|
+
<configuration default="false" name="All tests in spec: pin_up" type="TestUnitRunConfigurationType" factoryName="Test::Unit/Shoulda/Minitest" temporary="true">
|
73
|
+
<predefined_log_file id="RUBY_TESTUNIT" enabled="true" />
|
74
|
+
<module name="pin_up" />
|
75
|
+
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
|
76
|
+
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="$MODULE_DIR$/spec" />
|
77
|
+
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
|
78
|
+
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
|
79
|
+
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
|
80
|
+
<envs>
|
81
|
+
<env name="JRUBY_OPTS" value="-X+O" />
|
82
|
+
</envs>
|
83
|
+
<EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="false" />
|
84
|
+
<EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
|
85
|
+
<EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov">
|
86
|
+
<COVERAGE_PATTERN ENABLED="true">
|
87
|
+
<PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
|
88
|
+
</COVERAGE_PATTERN>
|
89
|
+
</EXTENSION>
|
90
|
+
<EXTENSION ID="org.jetbrains.plugins.ruby.motion.run.MotionSimulatorRunExtension" />
|
91
|
+
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="TESTS_FOLDER_PATH" VALUE="$MODULE_DIR$/spec" />
|
92
|
+
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_SCRIPT_PATH" VALUE="" />
|
93
|
+
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_FILE_MASK" VALUE="**/{*_test,test_*}.rb" />
|
94
|
+
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_METHOD_NAME" VALUE="" />
|
95
|
+
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_TEST_TYPE" VALUE="ALL_IN_FOLDER" />
|
96
|
+
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="DRB" VALUE="false" />
|
97
|
+
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="ZEUS" VALUE="false" />
|
98
|
+
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="RUNNER_OPTIONS" VALUE="" />
|
99
|
+
<RunnerSettings RunnerId="RubyCover" />
|
100
|
+
<RunnerSettings RunnerId="RubyRunner" />
|
101
|
+
<ConfigurationWrapper RunnerId="RubyCover" />
|
102
|
+
<ConfigurationWrapper RunnerId="RubyRunner" />
|
103
|
+
<method />
|
104
|
+
</configuration>
|
105
|
+
</component>
|
12
106
|
<component name="NewModuleRootManager">
|
13
107
|
<content url="file://$MODULE_DIR$" />
|
14
108
|
<orderEntry type="inheritedJdk" />
|
@@ -17,12 +111,18 @@
|
|
17
111
|
<orderEntry type="library" scope="PROVIDED" name="addressable (v2.3.5, rbenv: 2.0.0-p0) [gem]" level="application" />
|
18
112
|
<orderEntry type="library" scope="PROVIDED" name="atomic (v1.1.10, rbenv: 2.0.0-p0) [gem]" level="application" />
|
19
113
|
<orderEntry type="library" scope="PROVIDED" name="builder (v3.2.2, rbenv: 2.0.0-p0) [gem]" level="application" />
|
20
|
-
<orderEntry type="library" scope="PROVIDED" name="bundler (v1.3.
|
114
|
+
<orderEntry type="library" scope="PROVIDED" name="bundler (v1.3.5, rbenv: 2.0.0-p0) [gem]" level="application" />
|
115
|
+
<orderEntry type="library" scope="PROVIDED" name="capybara (v2.1.0, rbenv: 2.0.0-p0) [gem]" level="application" />
|
116
|
+
<orderEntry type="library" scope="PROVIDED" name="coderay (v1.0.9, rbenv: 2.0.0-p0) [gem]" level="application" />
|
21
117
|
<orderEntry type="library" scope="PROVIDED" name="crack (v0.4.0, rbenv: 2.0.0-p0) [gem]" level="application" />
|
22
118
|
<orderEntry type="library" scope="PROVIDED" name="diff-lcs (v1.2.4, rbenv: 2.0.0-p0) [gem]" level="application" />
|
23
119
|
<orderEntry type="library" scope="PROVIDED" name="faraday (v0.8.7, rbenv: 2.0.0-p0) [gem]" level="application" />
|
120
|
+
<orderEntry type="library" scope="PROVIDED" name="ffi (v1.9.0, rbenv: 2.0.0-p0) [gem]" level="application" />
|
121
|
+
<orderEntry type="library" scope="PROVIDED" name="formatador (v0.2.4, rbenv: 2.0.0-p0) [gem]" level="application" />
|
24
122
|
<orderEntry type="library" scope="PROVIDED" name="git (v1.2.5, rbenv: 2.0.0-p0) [gem]" level="application" />
|
25
123
|
<orderEntry type="library" scope="PROVIDED" name="github_api (v0.10.1, rbenv: 2.0.0-p0) [gem]" level="application" />
|
124
|
+
<orderEntry type="library" scope="PROVIDED" name="guard (v1.8.1, rbenv: 2.0.0-p0) [gem]" level="application" />
|
125
|
+
<orderEntry type="library" scope="PROVIDED" name="guard-rspec (v3.0.2, rbenv: 2.0.0-p0) [gem]" level="application" />
|
26
126
|
<orderEntry type="library" scope="PROVIDED" name="hashie (v2.0.5, rbenv: 2.0.0-p0) [gem]" level="application" />
|
27
127
|
<orderEntry type="library" scope="PROVIDED" name="highline (v1.6.19, rbenv: 2.0.0-p0) [gem]" level="application" />
|
28
128
|
<orderEntry type="library" scope="PROVIDED" name="httparty (v0.11.0, rbenv: 2.0.0-p0) [gem]" level="application" />
|
@@ -31,14 +131,23 @@
|
|
31
131
|
<orderEntry type="library" scope="PROVIDED" name="jeweler (v1.8.5, rbenv: 2.0.0-p0) [gem]" level="application" />
|
32
132
|
<orderEntry type="library" scope="PROVIDED" name="json (v1.8.0, rbenv: 2.0.0-p0) [gem]" level="application" />
|
33
133
|
<orderEntry type="library" scope="PROVIDED" name="jwt (v0.1.8, rbenv: 2.0.0-p0) [gem]" level="application" />
|
134
|
+
<orderEntry type="library" scope="PROVIDED" name="listen (v1.2.2, rbenv: 2.0.0-p0) [gem]" level="application" />
|
135
|
+
<orderEntry type="library" scope="PROVIDED" name="lumberjack (v1.0.3, rbenv: 2.0.0-p0) [gem]" level="application" />
|
136
|
+
<orderEntry type="library" scope="PROVIDED" name="method_source (v0.8.1, rbenv: 2.0.0-p0) [gem]" level="application" />
|
137
|
+
<orderEntry type="library" scope="PROVIDED" name="mime-types (v1.25, rbenv: 2.0.0-p0) [gem]" level="application" />
|
34
138
|
<orderEntry type="library" scope="PROVIDED" name="minitest (v4.7.5, rbenv: 2.0.0-p0) [gem]" level="application" />
|
35
139
|
<orderEntry type="library" scope="PROVIDED" name="multi_json (v1.7.7, rbenv: 2.0.0-p0) [gem]" level="application" />
|
36
140
|
<orderEntry type="library" scope="PROVIDED" name="multi_xml (v0.5.4, rbenv: 2.0.0-p0) [gem]" level="application" />
|
37
141
|
<orderEntry type="library" scope="PROVIDED" name="multipart-post (v1.2.0, rbenv: 2.0.0-p0) [gem]" level="application" />
|
38
142
|
<orderEntry type="library" scope="PROVIDED" name="nokogiri (v1.5.10, rbenv: 2.0.0-p0) [gem]" level="application" />
|
39
143
|
<orderEntry type="library" scope="PROVIDED" name="oauth2 (v0.9.2, rbenv: 2.0.0-p0) [gem]" level="application" />
|
144
|
+
<orderEntry type="library" scope="PROVIDED" name="pry (v0.9.12.2, rbenv: 2.0.0-p0) [gem]" level="application" />
|
40
145
|
<orderEntry type="library" scope="PROVIDED" name="rack (v1.5.2, rbenv: 2.0.0-p0) [gem]" level="application" />
|
146
|
+
<orderEntry type="library" scope="PROVIDED" name="rack-test (v0.6.2, rbenv: 2.0.0-p0) [gem]" level="application" />
|
41
147
|
<orderEntry type="library" scope="PROVIDED" name="rake (v10.1.0, rbenv: 2.0.0-p0) [gem]" level="application" />
|
148
|
+
<orderEntry type="library" scope="PROVIDED" name="rb-fsevent (v0.9.3, rbenv: 2.0.0-p0) [gem]" level="application" />
|
149
|
+
<orderEntry type="library" scope="PROVIDED" name="rb-inotify (v0.9.0, rbenv: 2.0.0-p0) [gem]" level="application" />
|
150
|
+
<orderEntry type="library" scope="PROVIDED" name="rb-kqueue (v0.2.0, rbenv: 2.0.0-p0) [gem]" level="application" />
|
42
151
|
<orderEntry type="library" scope="PROVIDED" name="rdoc (v3.12.2, rbenv: 2.0.0-p0) [gem]" level="application" />
|
43
152
|
<orderEntry type="library" scope="PROVIDED" name="rspec (v2.13.0, rbenv: 2.0.0-p0) [gem]" level="application" />
|
44
153
|
<orderEntry type="library" scope="PROVIDED" name="rspec-core (v2.13.1, rbenv: 2.0.0-p0) [gem]" level="application" />
|
@@ -50,10 +159,14 @@
|
|
50
159
|
<orderEntry type="library" scope="PROVIDED" name="shoulda-matchers (v2.2.0, rbenv: 2.0.0-p0) [gem]" level="application" />
|
51
160
|
<orderEntry type="library" scope="PROVIDED" name="simplecov (v0.7.1, rbenv: 2.0.0-p0) [gem]" level="application" />
|
52
161
|
<orderEntry type="library" scope="PROVIDED" name="simplecov-html (v0.7.1, rbenv: 2.0.0-p0) [gem]" level="application" />
|
162
|
+
<orderEntry type="library" scope="PROVIDED" name="slop (v3.4.5, rbenv: 2.0.0-p0) [gem]" level="application" />
|
163
|
+
<orderEntry type="library" scope="PROVIDED" name="terminal-notifier-guard (v1.5.3, rbenv: 2.0.0-p0) [gem]" level="application" />
|
164
|
+
<orderEntry type="library" scope="PROVIDED" name="thor (v0.18.1, rbenv: 2.0.0-p0) [gem]" level="application" />
|
53
165
|
<orderEntry type="library" scope="PROVIDED" name="thread_safe (v0.1.0, rbenv: 2.0.0-p0) [gem]" level="application" />
|
54
166
|
<orderEntry type="library" scope="PROVIDED" name="tzinfo (v0.3.37, rbenv: 2.0.0-p0) [gem]" level="application" />
|
55
167
|
<orderEntry type="library" scope="PROVIDED" name="vcr (v2.5.0, rbenv: 2.0.0-p0) [gem]" level="application" />
|
56
168
|
<orderEntry type="library" scope="PROVIDED" name="webmock (v1.12.3, rbenv: 2.0.0-p0) [gem]" level="application" />
|
169
|
+
<orderEntry type="library" scope="PROVIDED" name="xpath (v2.0.0, rbenv: 2.0.0-p0) [gem]" level="application" />
|
57
170
|
</component>
|
58
171
|
</module>
|
59
172
|
|
data/.idea/workspace.xml
CHANGED
@@ -2,16 +2,11 @@
|
|
2
2
|
<project version="4">
|
3
3
|
<component name="ChangeListManager">
|
4
4
|
<list default="true" id="095279b6-99f0-4287-b7af-14f93fb9b243" name="Default" comment="">
|
5
|
-
<change type="MODIFICATION" beforePath="$PROJECT_DIR
|
6
|
-
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/lib/pin_up/base.rb" afterPath="$PROJECT_DIR$/lib/pin_up/base.rb" />
|
7
|
-
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/lib/pin_up/customer.rb" afterPath="$PROJECT_DIR$/lib/pin_up/customer.rb" />
|
8
|
-
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/spec/customers_spec.rb" afterPath="$PROJECT_DIR$/spec/customers_spec.rb" />
|
9
|
-
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/spec/refund_spec.rb" afterPath="$PROJECT_DIR$/spec/refund_spec.rb" />
|
5
|
+
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/pin_up.iml" afterPath="$PROJECT_DIR$/.idea/pin_up.iml" />
|
10
6
|
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/spec/spec_helper.rb" afterPath="$PROJECT_DIR$/spec/spec_helper.rb" />
|
11
7
|
</list>
|
12
8
|
<ignored path="pin_up.iws" />
|
13
9
|
<ignored path=".idea/workspace.xml" />
|
14
|
-
<file path="/Dummy.txt" changelist="095279b6-99f0-4287-b7af-14f93fb9b243" time="1376734351730" ignored="false" />
|
15
10
|
<option name="TRACKING_ENABLED" value="true" />
|
16
11
|
<option name="SHOW_DIALOG" value="false" />
|
17
12
|
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
@@ -19,6 +14,11 @@
|
|
19
14
|
<option name="LAST_RESOLUTION" value="IGNORE" />
|
20
15
|
</component>
|
21
16
|
<component name="ChangesViewManager" flattened_view="true" show_ignored="false" />
|
17
|
+
<component name="CoverageDataManager">
|
18
|
+
<SUITE FILE_PATH="coverage/pin_up@All_tests_in_spec__pin_up.coverage" NAME="All tests in spec: pin_up Coverage Results" MODIFIED="1385727222239" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="rcov" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/spec" MODULE_NAME="pin_up" />
|
19
|
+
<SUITE FILE_PATH="coverage/pin_up@spec_helper.coverage" NAME="spec_helper Coverage Results" MODIFIED="1385726988217" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="rcov" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/spec" MODULE_NAME="pin_up" />
|
20
|
+
<SUITE FILE_PATH="coverage/pin_up@All_specs_in__pin_up.coverage" NAME="All specs in: pin_up Coverage Results" MODIFIED="1385726519581" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="rcov" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" MODULE_NAME="pin_up" />
|
21
|
+
</component>
|
22
22
|
<component name="CreatePatchCommitExecutor">
|
23
23
|
<option name="PATCH_PATH" value="" />
|
24
24
|
</component>
|
@@ -29,6 +29,28 @@
|
|
29
29
|
<component name="FavoritesManager">
|
30
30
|
<favorites_list name="pin_up" />
|
31
31
|
</component>
|
32
|
+
<component name="FileEditorManager">
|
33
|
+
<leaf>
|
34
|
+
<file leaf-file-name="spec_helper.rb" pinned="false" current="false" current-in-tab="false">
|
35
|
+
<entry file="file://$PROJECT_DIR$/spec/spec_helper.rb">
|
36
|
+
<provider selected="true" editor-type-id="text-editor">
|
37
|
+
<state line="13" column="30" selection-start="258" selection-end="258" vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="585">
|
38
|
+
<folding />
|
39
|
+
</state>
|
40
|
+
</provider>
|
41
|
+
</entry>
|
42
|
+
</file>
|
43
|
+
<file leaf-file-name="Gemfile" pinned="false" current="true" current-in-tab="true">
|
44
|
+
<entry file="file://$PROJECT_DIR$/Gemfile">
|
45
|
+
<provider selected="true" editor-type-id="text-editor">
|
46
|
+
<state line="0" column="0" selection-start="0" selection-end="301" vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="740">
|
47
|
+
<folding />
|
48
|
+
</state>
|
49
|
+
</provider>
|
50
|
+
</entry>
|
51
|
+
</file>
|
52
|
+
</leaf>
|
53
|
+
</component>
|
32
54
|
<component name="FindManager">
|
33
55
|
<FindUsagesManager>
|
34
56
|
<setting name="OPEN_NEW_TAB" value="false" />
|
@@ -42,10 +64,36 @@
|
|
42
64
|
<MyDateState />
|
43
65
|
</option>
|
44
66
|
</component>
|
67
|
+
<component name="IdeDocumentHistory">
|
68
|
+
<option name="changedFiles">
|
69
|
+
<list>
|
70
|
+
<option value="$PROJECT_DIR$/spec/spec_helper.rb" />
|
71
|
+
</list>
|
72
|
+
</option>
|
73
|
+
</component>
|
45
74
|
<component name="ProjectFrameBounds">
|
46
75
|
<option name="y" value="22" />
|
47
|
-
<option name="width" value="
|
48
|
-
<option name="height" value="
|
76
|
+
<option name="width" value="1440" />
|
77
|
+
<option name="height" value="811" />
|
78
|
+
</component>
|
79
|
+
<component name="ProjectInspectionProfilesVisibleTreeState">
|
80
|
+
<entry key="Project Default">
|
81
|
+
<profile-state>
|
82
|
+
<expanded-state>
|
83
|
+
<State>
|
84
|
+
<id />
|
85
|
+
</State>
|
86
|
+
<State>
|
87
|
+
<id>Gems</id>
|
88
|
+
</State>
|
89
|
+
</expanded-state>
|
90
|
+
<selected-state>
|
91
|
+
<State>
|
92
|
+
<id>CoffeeScript</id>
|
93
|
+
</State>
|
94
|
+
</selected-state>
|
95
|
+
</profile-state>
|
96
|
+
</entry>
|
49
97
|
</component>
|
50
98
|
<component name="ProjectLevelVcsManager" settingsEditedManually="false">
|
51
99
|
<OptionsSetting value="true" id="Add" />
|
@@ -73,7 +121,6 @@
|
|
73
121
|
<sortByType />
|
74
122
|
</navigator>
|
75
123
|
<panes>
|
76
|
-
<pane id="Scope" />
|
77
124
|
<pane id="ProjectPane">
|
78
125
|
<subPane>
|
79
126
|
<PATH>
|
@@ -108,19 +155,28 @@
|
|
108
155
|
</PATH>
|
109
156
|
</subPane>
|
110
157
|
</pane>
|
158
|
+
<pane id="Scope" />
|
111
159
|
</panes>
|
112
160
|
</component>
|
113
161
|
<component name="PropertiesComponent">
|
114
162
|
<property name="WebServerToolWindowFactoryState" value="false" />
|
115
163
|
<property name="recentsLimit" value="5" />
|
116
164
|
<property name="FullScreen" value="false" />
|
165
|
+
<property name="GoToFile.includeJavaFiles" value="true" />
|
166
|
+
<property name="restartRequiresConfirmation" value="true" />
|
167
|
+
<property name="options.lastSelected" value="Errors" />
|
168
|
+
<property name="options.splitter.main.proportions" value="0.3" />
|
169
|
+
<property name="options.splitter.details.proportions" value="0.2" />
|
170
|
+
<property name="options.searchVisible" value="true" />
|
171
|
+
<property name="RakeTaksPopup.undocumentedIncluded" value="false" />
|
172
|
+
<property name="last_opened_file_path" value="$PROJECT_DIR$/../pin_up_receipts" />
|
117
173
|
</component>
|
118
|
-
<component name="RunManager" selected="
|
174
|
+
<component name="RunManager" selected="Test::Unit/Shoulda/Minitest.All tests in spec: pin_up">
|
119
175
|
<configuration default="false" name="All specs in: pin_up" type="RSpecRunConfigurationType" factoryName="RSpec" temporary="true">
|
120
176
|
<predefined_log_file id="RUBY_RSPEC" enabled="true" />
|
121
177
|
<module name="pin_up" />
|
122
178
|
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
|
123
|
-
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="$
|
179
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="$MODULE_DIR$" />
|
124
180
|
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
|
125
181
|
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
|
126
182
|
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
|
@@ -128,14 +184,14 @@
|
|
128
184
|
<env name="JRUBY_OPTS" value="-X+O" />
|
129
185
|
</envs>
|
130
186
|
<EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="true" />
|
131
|
-
<EXTENSION ID="JRubyRunConfigurationExtension" />
|
187
|
+
<EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
|
132
188
|
<EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov">
|
133
189
|
<COVERAGE_PATTERN ENABLED="true">
|
134
190
|
<PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
|
135
191
|
</COVERAGE_PATTERN>
|
136
192
|
</EXTENSION>
|
137
193
|
<EXTENSION ID="org.jetbrains.plugins.ruby.motion.run.MotionSimulatorRunExtension" />
|
138
|
-
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TESTS_FOLDER_PATH" VALUE="$
|
194
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TESTS_FOLDER_PATH" VALUE="$MODULE_DIR$" />
|
139
195
|
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_SCRIPT_PATH" VALUE="" />
|
140
196
|
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_RUNNER_PATH" VALUE="" />
|
141
197
|
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_FILE_MASK" VALUE="**/*_spec.rb" />
|
@@ -145,11 +201,69 @@
|
|
145
201
|
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="RUNNER_VERSION" VALUE="" />
|
146
202
|
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="USE_CUSTOM_SPEC_RUNNER" VALUE="false" />
|
147
203
|
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="DRB" VALUE="false" />
|
204
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="ZEUS" VALUE="false" />
|
148
205
|
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="FULL_BACKTRACE" VALUE="false" />
|
149
206
|
<RunnerSettings RunnerId="RubyRunner" />
|
150
207
|
<ConfigurationWrapper RunnerId="RubyRunner" />
|
151
208
|
<method />
|
152
209
|
</configuration>
|
210
|
+
<configuration default="false" name="spec_helper" type="RubyRunConfigurationType" factoryName="Ruby" temporary="true">
|
211
|
+
<module name="pin_up" />
|
212
|
+
<RUBY_RUN_CONFIG NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
|
213
|
+
<RUBY_RUN_CONFIG NAME="WORK DIR" VALUE="$MODULE_DIR$/spec" />
|
214
|
+
<RUBY_RUN_CONFIG NAME="SHOULD_USE_SDK" VALUE="false" />
|
215
|
+
<RUBY_RUN_CONFIG NAME="ALTERN_SDK_NAME" VALUE="" />
|
216
|
+
<RUBY_RUN_CONFIG NAME="myPassParentEnvs" VALUE="true" />
|
217
|
+
<envs />
|
218
|
+
<EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="true" />
|
219
|
+
<EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
|
220
|
+
<EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov">
|
221
|
+
<COVERAGE_PATTERN ENABLED="true">
|
222
|
+
<PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
|
223
|
+
</COVERAGE_PATTERN>
|
224
|
+
</EXTENSION>
|
225
|
+
<EXTENSION ID="org.jetbrains.plugins.ruby.motion.run.MotionSimulatorRunExtension" />
|
226
|
+
<RUBY_RUN_CONFIG NAME="SCRIPT_PATH" VALUE="$MODULE_DIR$/spec/spec_helper.rb" />
|
227
|
+
<RUBY_RUN_CONFIG NAME="SCRIPT_ARGS" VALUE="" />
|
228
|
+
<RunnerSettings RunnerId="RubyCover" />
|
229
|
+
<RunnerSettings RunnerId="RubyRunner" />
|
230
|
+
<ConfigurationWrapper RunnerId="RubyCover" />
|
231
|
+
<ConfigurationWrapper RunnerId="RubyRunner" />
|
232
|
+
<method />
|
233
|
+
</configuration>
|
234
|
+
<configuration default="false" name="All tests in spec: pin_up" type="TestUnitRunConfigurationType" factoryName="Test::Unit/Shoulda/Minitest" temporary="true">
|
235
|
+
<predefined_log_file id="RUBY_TESTUNIT" enabled="true" />
|
236
|
+
<module name="pin_up" />
|
237
|
+
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
|
238
|
+
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="$MODULE_DIR$/spec" />
|
239
|
+
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
|
240
|
+
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
|
241
|
+
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
|
242
|
+
<envs>
|
243
|
+
<env name="JRUBY_OPTS" value="-X+O" />
|
244
|
+
</envs>
|
245
|
+
<EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="false" />
|
246
|
+
<EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
|
247
|
+
<EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov">
|
248
|
+
<COVERAGE_PATTERN ENABLED="true">
|
249
|
+
<PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
|
250
|
+
</COVERAGE_PATTERN>
|
251
|
+
</EXTENSION>
|
252
|
+
<EXTENSION ID="org.jetbrains.plugins.ruby.motion.run.MotionSimulatorRunExtension" />
|
253
|
+
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="TESTS_FOLDER_PATH" VALUE="$MODULE_DIR$/spec" />
|
254
|
+
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_SCRIPT_PATH" VALUE="" />
|
255
|
+
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_FILE_MASK" VALUE="**/{*_test,test_*}.rb" />
|
256
|
+
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_METHOD_NAME" VALUE="" />
|
257
|
+
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_TEST_TYPE" VALUE="ALL_IN_FOLDER" />
|
258
|
+
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="DRB" VALUE="false" />
|
259
|
+
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="ZEUS" VALUE="false" />
|
260
|
+
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="RUNNER_OPTIONS" VALUE="" />
|
261
|
+
<RunnerSettings RunnerId="RubyCover" />
|
262
|
+
<RunnerSettings RunnerId="RubyRunner" />
|
263
|
+
<ConfigurationWrapper RunnerId="RubyCover" />
|
264
|
+
<ConfigurationWrapper RunnerId="RubyRunner" />
|
265
|
+
<method />
|
266
|
+
</configuration>
|
153
267
|
<configuration default="true" type="RSpecRunConfigurationType" factoryName="RSpec">
|
154
268
|
<predefined_log_file id="RUBY_RSPEC" enabled="true" />
|
155
269
|
<module name="" />
|
@@ -160,7 +274,7 @@
|
|
160
274
|
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
|
161
275
|
<envs />
|
162
276
|
<EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="false" />
|
163
|
-
<EXTENSION ID="JRubyRunConfigurationExtension" />
|
277
|
+
<EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
|
164
278
|
<EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov">
|
165
279
|
<COVERAGE_PATTERN ENABLED="true">
|
166
280
|
<PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
|
@@ -177,9 +291,33 @@
|
|
177
291
|
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="RUNNER_VERSION" VALUE="" />
|
178
292
|
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="USE_CUSTOM_SPEC_RUNNER" VALUE="false" />
|
179
293
|
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="DRB" VALUE="false" />
|
294
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="ZEUS" VALUE="false" />
|
180
295
|
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="FULL_BACKTRACE" VALUE="false" />
|
181
296
|
<method />
|
182
297
|
</configuration>
|
298
|
+
<configuration default="true" type="RubyRunConfigurationType" factoryName="Ruby">
|
299
|
+
<module name="" />
|
300
|
+
<RUBY_RUN_CONFIG NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
|
301
|
+
<RUBY_RUN_CONFIG NAME="WORK DIR" VALUE="" />
|
302
|
+
<RUBY_RUN_CONFIG NAME="SHOULD_USE_SDK" VALUE="false" />
|
303
|
+
<RUBY_RUN_CONFIG NAME="ALTERN_SDK_NAME" VALUE="" />
|
304
|
+
<RUBY_RUN_CONFIG NAME="myPassParentEnvs" VALUE="true" />
|
305
|
+
<envs />
|
306
|
+
<EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="false" />
|
307
|
+
<EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
|
308
|
+
<EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov">
|
309
|
+
<COVERAGE_PATTERN ENABLED="true">
|
310
|
+
<PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
|
311
|
+
</COVERAGE_PATTERN>
|
312
|
+
</EXTENSION>
|
313
|
+
<EXTENSION ID="org.jetbrains.plugins.ruby.motion.run.MotionSimulatorRunExtension" />
|
314
|
+
<RUBY_RUN_CONFIG NAME="SCRIPT_PATH" VALUE="" />
|
315
|
+
<RUBY_RUN_CONFIG NAME="SCRIPT_ARGS" VALUE="" />
|
316
|
+
<method />
|
317
|
+
</configuration>
|
318
|
+
<configuration default="true" type="JavascriptDebugType" factoryName="JavaScript Debug" singleton="true">
|
319
|
+
<method />
|
320
|
+
</configuration>
|
183
321
|
<configuration default="true" type="TestUnitRunConfigurationType" factoryName="Test::Unit/Shoulda/Minitest">
|
184
322
|
<predefined_log_file id="RUBY_TESTUNIT" enabled="true" />
|
185
323
|
<module name="" />
|
@@ -190,7 +328,7 @@
|
|
190
328
|
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
|
191
329
|
<envs />
|
192
330
|
<EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="false" />
|
193
|
-
<EXTENSION ID="JRubyRunConfigurationExtension" />
|
331
|
+
<EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
|
194
332
|
<EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov">
|
195
333
|
<COVERAGE_PATTERN ENABLED="true">
|
196
334
|
<PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
|
@@ -203,15 +341,20 @@
|
|
203
341
|
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_METHOD_NAME" VALUE="" />
|
204
342
|
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_TEST_TYPE" VALUE="TEST_SCRIPT" />
|
205
343
|
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="DRB" VALUE="false" />
|
344
|
+
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="ZEUS" VALUE="false" />
|
206
345
|
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="RUNNER_OPTIONS" VALUE="" />
|
207
346
|
<method />
|
208
347
|
</configuration>
|
209
|
-
<list size="
|
348
|
+
<list size="3">
|
210
349
|
<item index="0" class="java.lang.String" itemvalue="RSpec.All specs in: pin_up" />
|
350
|
+
<item index="1" class="java.lang.String" itemvalue="Ruby.spec_helper" />
|
351
|
+
<item index="2" class="java.lang.String" itemvalue="Test::Unit/Shoulda/Minitest.All tests in spec: pin_up" />
|
211
352
|
</list>
|
212
353
|
<recent_temporary>
|
213
|
-
<list size="
|
214
|
-
<item index="0" class="java.lang.String" itemvalue="
|
354
|
+
<list size="3">
|
355
|
+
<item index="0" class="java.lang.String" itemvalue="Test::Unit/Shoulda/Minitest.All tests in spec: pin_up" />
|
356
|
+
<item index="1" class="java.lang.String" itemvalue="Ruby.spec_helper" />
|
357
|
+
<item index="2" class="java.lang.String" itemvalue="RSpec.All specs in: pin_up" />
|
215
358
|
</list>
|
216
359
|
</recent_temporary>
|
217
360
|
</component>
|
@@ -242,19 +385,21 @@
|
|
242
385
|
<servers />
|
243
386
|
</component>
|
244
387
|
<component name="ToolWindowManager">
|
245
|
-
<frame x="0" y="22" width="
|
388
|
+
<frame x="0" y="22" width="1440" height="811" extended-state="6" />
|
246
389
|
<editor active="false" />
|
247
390
|
<layout>
|
248
|
-
<window_info id="
|
391
|
+
<window_info id="Coverage" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.3298611" sideWeight="0.5" order="-1" side_tool="true" content_ui="tabs" />
|
392
|
+
<window_info id="Changes" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
|
393
|
+
<window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
|
249
394
|
<window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
|
250
|
-
<window_info id="Database" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="
|
395
|
+
<window_info id="Database" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
|
251
396
|
<window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
|
252
|
-
<window_info id="Project" active="true" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.
|
397
|
+
<window_info id="Project" active="true" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.24930556" sideWeight="0.6706539" order="0" side_tool="false" content_ui="combo" />
|
253
398
|
<window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
|
254
|
-
<window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="
|
255
|
-
<window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="
|
256
|
-
<window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="
|
257
|
-
<window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="
|
399
|
+
<window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="2" side_tool="true" content_ui="tabs" />
|
400
|
+
<window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="true" content_ui="tabs" />
|
401
|
+
<window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.328125" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
|
402
|
+
<window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
|
258
403
|
<window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
|
259
404
|
<window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
|
260
405
|
<window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
|
@@ -264,65 +409,37 @@
|
|
264
409
|
<window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" />
|
265
410
|
</layout>
|
266
411
|
</component>
|
412
|
+
<component name="Vcs.Log.UiProperties">
|
413
|
+
<option name="RECENTLY_FILTERED_USERS">
|
414
|
+
<collection />
|
415
|
+
</option>
|
416
|
+
</component>
|
267
417
|
<component name="VcsContentAnnotationSettings">
|
268
418
|
<option name="myLimit" value="2678400000" />
|
269
419
|
</component>
|
270
420
|
<component name="VcsManagerConfiguration">
|
271
|
-
<option name="OFFER_MOVE_TO_ANOTHER_CHANGELIST_ON_PARTIAL_COMMIT" value="true" />
|
272
|
-
<option name="CHECK_CODE_SMELLS_BEFORE_PROJECT_COMMIT" value="false" />
|
273
|
-
<option name="CHECK_NEW_TODO" value="true" />
|
274
421
|
<option name="myTodoPanelSettings">
|
275
|
-
<
|
276
|
-
<are-packages-shown value="false" />
|
277
|
-
<are-modules-shown value="false" />
|
278
|
-
<flatten-packages value="false" />
|
279
|
-
<is-autoscroll-to-source value="false" />
|
280
|
-
</value>
|
422
|
+
<TodoPanelSettings />
|
281
423
|
</option>
|
282
|
-
<option name="PERFORM_UPDATE_IN_BACKGROUND" value="true" />
|
283
|
-
<option name="PERFORM_COMMIT_IN_BACKGROUND" value="true" />
|
284
|
-
<option name="PERFORM_EDIT_IN_BACKGROUND" value="true" />
|
285
|
-
<option name="PERFORM_CHECKOUT_IN_BACKGROUND" value="true" />
|
286
|
-
<option name="PERFORM_ADD_REMOVE_IN_BACKGROUND" value="true" />
|
287
|
-
<option name="PERFORM_ROLLBACK_IN_BACKGROUND" value="false" />
|
288
|
-
<option name="CHECK_LOCALLY_CHANGED_CONFLICTS_IN_BACKGROUND" value="false" />
|
289
|
-
<option name="CHANGED_ON_SERVER_INTERVAL" value="60" />
|
290
|
-
<option name="SHOW_ONLY_CHANGED_IN_SELECTION_DIFF" value="true" />
|
291
|
-
<option name="CHECK_COMMIT_MESSAGE_SPELLING" value="true" />
|
292
|
-
<option name="DEFAULT_PATCH_EXTENSION" value="patch" />
|
293
|
-
<option name="SHORT_DIFF_HORIZONTALLY" value="true" />
|
294
|
-
<option name="SHORT_DIFF_EXTRA_LINES" value="2" />
|
295
|
-
<option name="SOFT_WRAPS_IN_SHORT_DIFF" value="true" />
|
296
|
-
<option name="INCLUDE_TEXT_INTO_PATCH" value="false" />
|
297
|
-
<option name="INCLUDE_TEXT_INTO_SHELF" value="false" />
|
298
|
-
<option name="SHOW_FILE_HISTORY_DETAILS" value="true" />
|
299
|
-
<option name="SHOW_VCS_ERROR_NOTIFICATIONS" value="true" />
|
300
|
-
<option name="SHOW_DIRTY_RECURSIVELY" value="false" />
|
301
|
-
<option name="LIMIT_HISTORY" value="true" />
|
302
|
-
<option name="MAXIMUM_HISTORY_ROWS" value="1000" />
|
303
|
-
<option name="UPDATE_FILTER_SCOPE_NAME" />
|
304
|
-
<option name="USE_COMMIT_MESSAGE_MARGIN" value="false" />
|
305
|
-
<option name="COMMIT_MESSAGE_MARGIN_SIZE" value="72" />
|
306
|
-
<option name="WRAP_WHEN_TYPING_REACHES_RIGHT_MARGIN" value="false" />
|
307
|
-
<option name="FORCE_NON_EMPTY_COMMENT" value="false" />
|
308
|
-
<option name="CLEAR_INITIAL_COMMIT_MESSAGE" value="false" />
|
309
|
-
<option name="LAST_COMMIT_MESSAGE" />
|
310
|
-
<option name="MAKE_NEW_CHANGELIST_ACTIVE" value="false" />
|
311
|
-
<option name="OPTIMIZE_IMPORTS_BEFORE_PROJECT_COMMIT" value="false" />
|
312
|
-
<option name="CHECK_FILES_UP_TO_DATE_BEFORE_COMMIT" value="false" />
|
313
|
-
<option name="REFORMAT_BEFORE_PROJECT_COMMIT" value="false" />
|
314
|
-
<option name="REFORMAT_BEFORE_FILE_COMMIT" value="false" />
|
315
|
-
<option name="FILE_HISTORY_DIALOG_COMMENTS_SPLITTER_PROPORTION" value="0.8" />
|
316
|
-
<option name="FILE_HISTORY_DIALOG_SPLITTER_PROPORTION" value="0.5" />
|
317
|
-
<option name="ACTIVE_VCS_NAME" />
|
318
|
-
<option name="UPDATE_GROUP_BY_PACKAGES" value="false" />
|
319
|
-
<option name="UPDATE_GROUP_BY_CHANGELIST" value="false" />
|
320
|
-
<option name="UPDATE_FILTER_BY_SCOPE" value="false" />
|
321
|
-
<option name="SHOW_FILE_HISTORY_AS_TREE" value="false" />
|
322
|
-
<option name="FILE_HISTORY_SPLITTER_PROPORTION" value="0.6" />
|
323
424
|
</component>
|
324
425
|
<component name="XDebuggerManager">
|
325
426
|
<breakpoint-manager />
|
326
427
|
</component>
|
428
|
+
<component name="editorHistoryManager">
|
429
|
+
<entry file="file://$PROJECT_DIR$/spec/spec_helper.rb">
|
430
|
+
<provider selected="true" editor-type-id="text-editor">
|
431
|
+
<state line="13" column="30" selection-start="258" selection-end="258" vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="585">
|
432
|
+
<folding />
|
433
|
+
</state>
|
434
|
+
</provider>
|
435
|
+
</entry>
|
436
|
+
<entry file="file://$PROJECT_DIR$/Gemfile">
|
437
|
+
<provider selected="true" editor-type-id="text-editor">
|
438
|
+
<state line="0" column="0" selection-start="0" selection-end="301" vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="740">
|
439
|
+
<folding />
|
440
|
+
</state>
|
441
|
+
</provider>
|
442
|
+
</entry>
|
443
|
+
</component>
|
327
444
|
</project>
|
328
445
|
|
data/README.md
CHANGED
@@ -142,50 +142,7 @@ Only use this method if you're comfortable sending card details to your server -
|
|
142
142
|
|
143
143
|
## Receipts
|
144
144
|
|
145
|
-
|
146
|
-
|
147
|
-
At the moment basic receipt creation from a succesful charge is supported, however, I'd like to build out this feature and include failed transactions and refunds.
|
148
|
-
|
149
|
-
There are two ways to go about creating and viewing / sharing a receipt.
|
150
|
-
|
151
|
-
#### Rendering a receipt as HTML
|
152
|
-
|
153
|
-
##### Basic Usage:
|
154
|
-
|
155
|
-
The following will return a HTML receipt for you to do with as you wish.
|
156
|
-
|
157
|
-
@charge = Pin::Charges.find("token")
|
158
|
-
@company_details = ["ABC Widgets","123 Fake Street Melbourne","VIC 3000","ABN: 12 345 678 910"]
|
159
|
-
@receipt = Pin::Receipt.new(@charge, @company_details)
|
160
|
-
@receipt.render()
|
161
|
-
|
162
|
-
Your "comapny_details" can be replaced with whatever information you wish to be displayed at the top right hand side (see `tmp/receipt.html`).
|
163
|
-
|
164
|
-
##### Advanced Usage:
|
165
|
-
|
166
|
-
There are four additional options that can be passed to `Pin::Receipt.new`.
|
167
|
-
|
168
|
-
The first is the path to your logo should you wish to include it in the footer.
|
169
|
-
|
170
|
-
The second is some additional payment information you might want to add (such as tax, fee or discount information). This can be done by passing a hash in as argument 4 eg:
|
171
|
-
|
172
|
-
payment_options = {}
|
173
|
-
payment_options["fee"] = {"name" => "late fee", "amount" => "$10.00"}
|
174
|
-
payment_options["tax"] = {"name" => "GST", "amount" => "$10.00"}
|
175
|
-
payment_options["discount"] = {"name" => "Member Discount", "amount" => "$10.00"}
|
176
|
-
|
177
|
-
A path to a custom receipt template can be passed in as the 5th argument, while a path that you would like the receipt to be saved to can be passed in as the 6th argument.
|
178
|
-
|
179
|
-
|
180
|
-
##### Saving a receipt
|
181
|
-
|
182
|
-
To save a receipt it's exactky the same as above, just call `save` instead of render. By default, a receipt will be saved into `tmp/receipt.html` unless a path is specified.
|
183
|
-
|
184
|
-
If you would like a PDF receipt, you should be able to "print as PDF" from a browser dialog.
|
185
|
-
|
186
|
-
##### Custom receipt template
|
187
|
-
|
188
|
-
If you would like you can use a custom receipt template to suit your branding or design needs. To get an idea of which variables are available, take a look at `/views/receit.html.erb`
|
145
|
+
Receipts have been extracted out into their [own gem](https://github.com/dNitza/pin_up_receipts)
|
189
146
|
|
190
147
|
## Testing localy
|
191
148
|
Create a YAML file under 'spec' called 'test_data.yml' and add in:
|
@@ -200,7 +157,6 @@ run
|
|
200
157
|
|
201
158
|
## To do
|
202
159
|
|
203
|
-
* Flesh out receipts - handle failed transactions and refunds
|
204
160
|
* Validate a response before it gets sent to Pin (eg. Update customer)
|
205
161
|
|
206
162
|
## Contributing to pin_up
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.8.0
|
data/lib/pin_up.rb
CHANGED
data/lib/pin_up/pin_errors.rb
CHANGED
@@ -21,9 +21,13 @@ module Pin
|
|
21
21
|
raise(Pin::ResourceNotFound, "#{response['error_description']}")
|
22
22
|
when 422
|
23
23
|
message = ""
|
24
|
-
|
25
|
-
|
26
|
-
|
24
|
+
begin
|
25
|
+
response['messages'].each do |m|
|
26
|
+
message += "#{m['code']}: #{m['message']}"
|
27
|
+
end
|
28
|
+
rescue
|
29
|
+
message = "#{response['error']}: #{response['error_description']}. Amount: #{response['messages']['amount'][0]}"
|
30
|
+
end
|
27
31
|
raise(Pin::InvalidResource, message)
|
28
32
|
end
|
29
33
|
end
|
data/pin_up.gemspec
CHANGED
@@ -2,15 +2,15 @@
|
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
3
|
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
|
-
# stub: pin_up 0.
|
5
|
+
# stub: pin_up 0.8.0 ruby lib
|
6
6
|
|
7
7
|
Gem::Specification.new do |s|
|
8
8
|
s.name = "pin_up"
|
9
|
-
s.version = "0.
|
9
|
+
s.version = "0.8.0"
|
10
10
|
|
11
11
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
12
12
|
s.authors = ["Daniel Nitsikopoulos"]
|
13
|
-
s.date = "2013-
|
13
|
+
s.date = "2013-12-06"
|
14
14
|
s.description = "A Ruby gem wrapper for the pin-payments (pin.net.au) API"
|
15
15
|
s.email = "dnitza@gmail.com"
|
16
16
|
s.extra_rdoc_files = [
|
@@ -43,7 +43,6 @@ Gem::Specification.new do |s|
|
|
43
43
|
"lib/pin_up/charge.rb",
|
44
44
|
"lib/pin_up/customer.rb",
|
45
45
|
"lib/pin_up/pin_errors.rb",
|
46
|
-
"lib/pin_up/receipt.rb",
|
47
46
|
"lib/pin_up/refund.rb",
|
48
47
|
"pin_up.gemspec",
|
49
48
|
"spec/base_spec.rb",
|
@@ -51,7 +50,6 @@ Gem::Specification.new do |s|
|
|
51
50
|
"spec/charges_spec.rb",
|
52
51
|
"spec/customers_spec.rb",
|
53
52
|
"spec/errors_spec.rb",
|
54
|
-
"spec/receipt_spec.rb",
|
55
53
|
"spec/refund_spec.rb",
|
56
54
|
"spec/spec_helper.rb",
|
57
55
|
"views/receipt.html.erb"
|
data/spec/errors_spec.rb
CHANGED
@@ -66,4 +66,17 @@ describe "Errors", :vcr, class: Pin::PinError do
|
|
66
66
|
expect{Pin::Customer.charges("foo")}.to raise_error(Pin::ResourceNotFound, "The requested resource could not be found.")
|
67
67
|
end
|
68
68
|
|
69
|
+
|
70
|
+
it "should raise a 422 error if no 2nd argument is given" do
|
71
|
+
options = {email: "dNitza@gmail.com", description: "A new charge from testing Pin gem", amount: "400", currency: "AUD", ip_address: "127.0.0.1", customer_token: "cus_8ImkZdEZ6BXUA6NcJDZg_g" }
|
72
|
+
@charge = Pin::Charges.create(options)
|
73
|
+
expect{Pin::Refund.create(@charge['token'])}.to raise_error(Pin::InvalidResource, "invalid_resource: One or more parameters were missing or invalid. Amount: can't be blank")
|
74
|
+
end
|
75
|
+
|
76
|
+
xit "should raise a 422 error if a value of < 100 is given" do
|
77
|
+
options = {email: "dNitza@gmail.com", description: "A new charge from testing Pin gem", amount: "400", currency: "AUD", ip_address: "127.0.0.1", customer_token: "cus_8ImkZdEZ6BXUA6NcJDZg_g" }
|
78
|
+
@charge = Pin::Charges.create(options)
|
79
|
+
expect{Pin::Refund.create(@charge['token'], 90)}.to raise_error(Pin::InvalidResource, "One or more parameters were missing or invalid")
|
80
|
+
end
|
81
|
+
|
69
82
|
end
|
data/spec/refund_spec.rb
CHANGED
@@ -18,17 +18,10 @@ describe "Refund", :vcr, class: Pin::Refund do
|
|
18
18
|
Pin::Refund.find('ch_S_3tP81Q9_sDngSv27gShQ',1,true)[:response].should_not == []
|
19
19
|
end
|
20
20
|
|
21
|
-
|
22
|
-
@charge
|
21
|
+
it "should create a refund for a given amount and charge" do
|
22
|
+
options = {email: "dNitza@gmail.com", description: "A new charge from testing Pin gem", amount: "400", currency: "AUD", ip_address: "127.0.0.1", customer_token: "cus_8ImkZdEZ6BXUA6NcJDZg_g" }
|
23
|
+
@charge = Pin::Charges.create(options)
|
23
24
|
Pin::Refund.create(@charge['token'], "400")['amount'].should == 400
|
24
25
|
end
|
25
26
|
|
26
|
-
#having issues with Pin raising a 500 error with this one.
|
27
|
-
xit "should create a refund for the entire amount of a charge if no amount given" do
|
28
|
-
@charge = Pin::Charges.search({query: "1000"})[1]
|
29
|
-
@refund = Pin::Refund.create(@charge['token'])
|
30
|
-
raise @refund.inspect
|
31
|
-
@refund['amount'].should == @charge['amount']
|
32
|
-
end
|
33
|
-
|
34
27
|
end
|
data/spec/spec_helper.rb
CHANGED
@@ -11,7 +11,7 @@ require "net/https"
|
|
11
11
|
require "uri"
|
12
12
|
|
13
13
|
## Uncomment to load in a .yml with your pin key
|
14
|
-
|
14
|
+
ENV.update YAML.load(File.read(File.expand_path("../test_data.yml", __FILE__)))
|
15
15
|
|
16
16
|
# require pin_up gem
|
17
17
|
require 'pin_up'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pin_up
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.8.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel Nitsikopoulos
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-12-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httparty
|
@@ -225,7 +225,6 @@ files:
|
|
225
225
|
- lib/pin_up/charge.rb
|
226
226
|
- lib/pin_up/customer.rb
|
227
227
|
- lib/pin_up/pin_errors.rb
|
228
|
-
- lib/pin_up/receipt.rb
|
229
228
|
- lib/pin_up/refund.rb
|
230
229
|
- pin_up.gemspec
|
231
230
|
- spec/base_spec.rb
|
@@ -233,7 +232,6 @@ files:
|
|
233
232
|
- spec/charges_spec.rb
|
234
233
|
- spec/customers_spec.rb
|
235
234
|
- spec/errors_spec.rb
|
236
|
-
- spec/receipt_spec.rb
|
237
235
|
- spec/refund_spec.rb
|
238
236
|
- spec/spec_helper.rb
|
239
237
|
- views/receipt.html.erb
|
data/lib/pin_up/receipt.rb
DELETED
@@ -1,65 +0,0 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
module Pin
|
3
|
-
##
|
4
|
-
# This class lets you generate and save receipts from a Pin::Charge.
|
5
|
-
class Receipt < Pin::Base
|
6
|
-
|
7
|
-
##
|
8
|
-
# Create a new Pin::Receipt instance
|
9
|
-
# Args:
|
10
|
-
# charge: Charge hash from Pin::Charge.find
|
11
|
-
# your_details: (Array), an Array of details you would like displayed about you or your company
|
12
|
-
# payment_options: (Hash), If your charge had extra components (such as late fees or discounts or taxes) pass them in here as a hash eg:
|
13
|
-
#
|
14
|
-
# payment_options = {}
|
15
|
-
# payment_options["fee"] = {"name" => "late fee", "amount" => "$10.00"}
|
16
|
-
# payment_options["tax"] = {"name" => "GST", "amount" => "$10.00"}
|
17
|
-
# payment_options["discount"] = {"name" => "Member Discount", "amount" => "$10.00"}
|
18
|
-
#
|
19
|
-
# template_path: (String), path to your own template if you wish to design your own receipt (take a look at the included template for variable names)
|
20
|
-
# save_path: (String), path that the HTML receipt will be saved
|
21
|
-
def initialize(charge, your_details, logo_path='', payment_options={}, template_path = 'views/receipt.html.erb', save_path = 'tmp/receipt.html')
|
22
|
-
@charge = charge
|
23
|
-
@logo = logo_path
|
24
|
-
@details = your_details
|
25
|
-
@payment_options = payment_options
|
26
|
-
@template_path = template_path if template_path
|
27
|
-
@save_path = save_path if save_path
|
28
|
-
@amount = number_to_currency(@charge["amount"], @charge["currency"])
|
29
|
-
end
|
30
|
-
|
31
|
-
##
|
32
|
-
# Renders the HTML receipt but does not save it -- useful for showing on screen
|
33
|
-
def render
|
34
|
-
template = ERB.new File.new(@template_path).read, nil, "%"
|
35
|
-
template.result(binding)
|
36
|
-
end
|
37
|
-
|
38
|
-
##
|
39
|
-
# Renders and saves the HTML receipt -- useful for emailing receipt
|
40
|
-
def save
|
41
|
-
receipt = File.new(@save_path, 'w')
|
42
|
-
receipt.write(render)
|
43
|
-
receipt.close
|
44
|
-
end
|
45
|
-
|
46
|
-
protected
|
47
|
-
|
48
|
-
##
|
49
|
-
# Converts a string to currency format.
|
50
|
-
# Args:
|
51
|
-
# number: (String) a dollar, pound or euro value in 'cents'
|
52
|
-
# currency: (String) a string representation of a currency as provided by Pin
|
53
|
-
def number_to_currency(number, currency)
|
54
|
-
case currency
|
55
|
-
when 'GBP'
|
56
|
-
symbol = '£'
|
57
|
-
when 'EUR'
|
58
|
-
symbol = '€'
|
59
|
-
else
|
60
|
-
symbol = '$'
|
61
|
-
end
|
62
|
-
"#{symbol}#{"%0.2f" % (number.to_f / 100)}"
|
63
|
-
end
|
64
|
-
end
|
65
|
-
end
|
data/spec/receipt_spec.rb
DELETED
@@ -1,37 +0,0 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
require 'spec_helper'
|
3
|
-
|
4
|
-
describe "Receipt", :vcr, class: Pin::Receipt do
|
5
|
-
before(:each) do
|
6
|
-
Pin::Base.new(ENV["PIN_SECRET"], :test)
|
7
|
-
@charge = Pin::Charges.find("ch_0kdOMXP7gG0_W_Vh8qAWdA")
|
8
|
-
@company_details = ["ABC Widgets", "123 Fake Street Melbourne","VIC 3000", "ABN: 12 345 678 910"]
|
9
|
-
@receipt = Pin::Receipt.new(@charge, @company_details)
|
10
|
-
end
|
11
|
-
|
12
|
-
it "should generate an HTML receipt given a charge" do
|
13
|
-
@receipt.render().should include(@charge["token"])
|
14
|
-
end
|
15
|
-
|
16
|
-
xit "should save an index.html file for the receipt" do
|
17
|
-
# tmp folder not included in git repo - travis ci failing
|
18
|
-
@receipt.save()
|
19
|
-
File.read('tmp/receipt.html').should include(@charge["token"])
|
20
|
-
File.delete('tmp/receipt.html')
|
21
|
-
end
|
22
|
-
|
23
|
-
it "should format a number as a currency" do
|
24
|
-
expect @receipt.send(:number_to_currency, 1989, 'null').should match(/[$,£,€]\d{1,}[.]\d{2}/)
|
25
|
-
end
|
26
|
-
|
27
|
-
it "should print payment option information" do
|
28
|
-
payment_options = {}
|
29
|
-
payment_options["fee"] = {"name" => "late fee", "amount" => "$10.00"}
|
30
|
-
payment_options["tax"] = {"name" => "GST", "amount" => "$10.00"}
|
31
|
-
payment_options["discount"] = {"name" => "Member Discount", "amount" => "$10.00"}
|
32
|
-
|
33
|
-
@detailed_receipt = Pin::Receipt.new(@charge, @company_details, nil, payment_options)
|
34
|
-
expect @detailed_receipt.render().should include("GST")
|
35
|
-
end
|
36
|
-
|
37
|
-
end
|