workarea-cyber_source 1.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (78) hide show
  1. checksums.yaml +7 -0
  2. data/.editorconfig +20 -0
  3. data/.github/ISSUE_TEMPLATE/bug_report.md +37 -0
  4. data/.github/ISSUE_TEMPLATE/documentation-request.md +17 -0
  5. data/.github/ISSUE_TEMPLATE/feature_request.md +20 -0
  6. data/.gitignore +14 -0
  7. data/.rails-rubocop.yml +140 -0
  8. data/.rubocop.yml +8 -0
  9. data/CHANGELOG.md +39 -0
  10. data/CODE_OF_CONDUCT.md +3 -0
  11. data/CONTRIBUTING.md +3 -0
  12. data/Gemfile +11 -0
  13. data/LICENSE +52 -0
  14. data/README.md +27 -0
  15. data/Rakefile +59 -0
  16. data/app/models/workarea/payment/authorize/credit_card.decorator +45 -0
  17. data/app/models/workarea/payment/capture/credit_card.decorator +14 -0
  18. data/app/models/workarea/payment/purchase/credit_card.decorator +48 -0
  19. data/app/models/workarea/payment/refund/credit_card.decorator +14 -0
  20. data/app/models/workarea/payment/store_credit_card.decorator +13 -0
  21. data/bin/rails +20 -0
  22. data/config/initializers/gateway.rb +1 -0
  23. data/lib/active_merchant/billing/bogus_cyber_source_gateway.rb +97 -0
  24. data/lib/active_merchant/billing/cyber_source_fix.rb +34 -0
  25. data/lib/workarea/cyber_source.rb +36 -0
  26. data/lib/workarea/cyber_source/engine.rb +8 -0
  27. data/lib/workarea/cyber_source/version.rb +5 -0
  28. data/test/dummy/Rakefile +6 -0
  29. data/test/dummy/bin/bundle +3 -0
  30. data/test/dummy/bin/rails +4 -0
  31. data/test/dummy/bin/rake +4 -0
  32. data/test/dummy/bin/setup +38 -0
  33. data/test/dummy/bin/update +29 -0
  34. data/test/dummy/bin/yarn +11 -0
  35. data/test/dummy/config.ru +5 -0
  36. data/test/dummy/config/application.rb +28 -0
  37. data/test/dummy/config/boot.rb +5 -0
  38. data/test/dummy/config/cable.yml +10 -0
  39. data/test/dummy/config/environment.rb +5 -0
  40. data/test/dummy/config/environments/development.rb +56 -0
  41. data/test/dummy/config/environments/production.rb +91 -0
  42. data/test/dummy/config/environments/test.rb +44 -0
  43. data/test/dummy/config/initializers/application_controller_renderer.rb +8 -0
  44. data/test/dummy/config/initializers/assets.rb +14 -0
  45. data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
  46. data/test/dummy/config/initializers/cookies_serializer.rb +5 -0
  47. data/test/dummy/config/initializers/filter_parameter_logging.rb +4 -0
  48. data/test/dummy/config/initializers/inflections.rb +16 -0
  49. data/test/dummy/config/initializers/mime_types.rb +4 -0
  50. data/test/dummy/config/initializers/workarea.rb +5 -0
  51. data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
  52. data/test/dummy/config/locales/en.yml +33 -0
  53. data/test/dummy/config/puma.rb +56 -0
  54. data/test/dummy/config/routes.rb +5 -0
  55. data/test/dummy/config/secrets.yml +32 -0
  56. data/test/dummy/config/spring.rb +6 -0
  57. data/test/dummy/db/seeds.rb +2 -0
  58. data/test/dummy/log/.keep +0 -0
  59. data/test/dummy/package.json +5 -0
  60. data/test/integration/workarea/cyber_source_integration_test.rb +191 -0
  61. data/test/models/workarea/payment/authorize/credit_card_test.decorator +68 -0
  62. data/test/models/workarea/payment/capture/credit_card_test.decorator +17 -0
  63. data/test/models/workarea/payment/purchase/credit_card_test.decorator +60 -0
  64. data/test/models/workarea/payment/refund/credit_card_test.decorator +17 -0
  65. data/test/models/workarea/payment/store_credit_card_test.decorator +15 -0
  66. data/test/support/workarea/cyber_source_support_vcr_config.rb +23 -0
  67. data/test/support/workarea/workarea_3_2_backports.rb +57 -0
  68. data/test/teaspoon_env.rb +6 -0
  69. data/test/test_helper.rb +11 -0
  70. data/test/vcr_cassettes/cyber_source/auth_capture.yml +254 -0
  71. data/test/vcr_cassettes/cyber_source/auth_capture_refund.yml +323 -0
  72. data/test/vcr_cassettes/cyber_source/auth_void.yml +250 -0
  73. data/test/vcr_cassettes/cyber_source/purchase_refund.yml +251 -0
  74. data/test/vcr_cassettes/cyber_source/purchase_void.yml +247 -0
  75. data/test/vcr_cassettes/cyber_source/store_auth.yml +179 -0
  76. data/test/vcr_cassettes/cyber_source/store_purchase.yml +180 -0
  77. data/workarea-cyber_source.gemspec +19 -0
  78. metadata +133 -0
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 5d8e8d6ebf74737af4e75ab1d636211d66cdb853a87c07c11715e91a72a566b5
4
+ data.tar.gz: e0991f94ee1fb9a927352da583aee855f98482a797003fff6efdc9799e8cdd0c
5
+ SHA512:
6
+ metadata.gz: ff027c2eaa7b720b80fe07b693cdbc7452235f92ee88191c746a46a57e35eb19b6af5ed5a76b5efc59b66b6e3e51e71aaa2630ad62d8d2a527ef5dcae248e965
7
+ data.tar.gz: f5808369b50b1d35c9cfbee5c7a0de374269c6066c635ed21375b78c8b7b3f049cf3210fec8e25c7501359b2f67e565e0a7282c878e59ea213c5fa2e33fb92ef
@@ -0,0 +1,20 @@
1
+ # editorconfig.org
2
+ root = true
3
+
4
+ [*]
5
+ charset = utf-8
6
+ indent_style = space
7
+ end_of_line = lf
8
+ trim_trailing_whitespace = true
9
+ insert_final_newline = true
10
+
11
+ [{*.rb,*.haml,*.decorator,*.yml,*.yaml,*.jbuilder}]
12
+ indent_size = 2
13
+ indent_style = space
14
+
15
+ [{*.js,*.jst,*.ejs,*.scss}]
16
+ indent_size = 4
17
+
18
+ [*.md]
19
+ indent_size = 4
20
+ trim_trailing_whitespace = false
@@ -0,0 +1,37 @@
1
+ ---
2
+ name: Bug report
3
+ about: Create a report to help us improve Workarea
4
+ title: ''
5
+ labels: bug
6
+ assignees: ''
7
+
8
+ ---
9
+
10
+ ⚠️**Before you create**⚠️
11
+ Please verify the issue you're experiencing is not part of your Workarea project customizations. The best way to do this is with a [vanilla Workarea installation](https://developer.workarea.com/articles/create-a-new-host-application.html). This will help us spend time on fixes/improvements for the whole community. Thank you!
12
+
13
+ **Describe the bug**
14
+ A clear and concise description of what the bug is.
15
+
16
+ **To Reproduce**
17
+ Steps to reproduce the behavior:
18
+ 1. Go to '...'
19
+ 2. Click on '....'
20
+ 3. Scroll down to '....'
21
+ 4. See error
22
+
23
+ **Expected behavior**
24
+ A clear and concise description of what you expected to happen.
25
+
26
+ **Workarea Setup (please complete the following information):**
27
+ - Workarea Version: [e.g. v3.4.6]
28
+ - Plugins [e.g. workarea-blog, workarea-sitemaps]
29
+
30
+ **Attachments**
31
+ If applicable, add any attachments to help explain your problem, things like:
32
+ - screenshots
33
+ - Gemfile.lock
34
+ - test cases
35
+
36
+ **Additional context**
37
+ Add any other context about the problem here.
@@ -0,0 +1,17 @@
1
+ ---
2
+ name: Documentation request
3
+ about: Suggest documentation
4
+ title: ''
5
+ labels: documentation
6
+ assignees: ''
7
+
8
+ ---
9
+
10
+ **Is your documentation related to a problem? Please describe.**
11
+ A clear and concise description of what the problem is. Ex. I'm confused by [...]
12
+
13
+ **Describe the article you'd like**
14
+ A clear and concise description of what would be in the documentation article.
15
+
16
+ **Additional context**
17
+ Add any other context or screenshots about the feature request here.
@@ -0,0 +1,20 @@
1
+ ---
2
+ name: Feature request
3
+ about: Suggest an idea for Workarea
4
+ title: ''
5
+ labels: enhancement
6
+ assignees: ''
7
+
8
+ ---
9
+
10
+ **Is your feature request related to a problem? Please describe.**
11
+ A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12
+
13
+ **Describe the solution you'd like**
14
+ A clear and concise description of what you want to happen.
15
+
16
+ **Describe alternatives you've considered**
17
+ A clear and concise description of any alternative solutions or features you've considered.
18
+
19
+ **Additional context**
20
+ Add any other context or screenshots about the feature request here.
@@ -0,0 +1,14 @@
1
+ .bundle/
2
+ .DS_Store
3
+ .byebug_history
4
+ .bundle/
5
+ .sass-cache/
6
+ Gemfile.lock
7
+ log/*.log
8
+ pkg/
9
+ test/dummy/db/*.sqlite3
10
+ test/dummy/db/*.sqlite3-journal
11
+ test/dummy/log/*.log
12
+ test/dummy/tmp/
13
+ test/dummy/public/
14
+ coverage/
@@ -0,0 +1,140 @@
1
+ AllCops:
2
+ # RuboCop has a bunch of cops enabled by default. This setting tells RuboCop
3
+ # to ignore them, so only the ones explicitly set in this file are enabled.
4
+ DisabledByDefault: true
5
+
6
+ # Prefer &&/|| over and/or.
7
+ Style/AndOr:
8
+ Enabled: true
9
+
10
+ # Do not use braces for hash literals when they are the last argument of a
11
+ # method call.
12
+ Style/BracesAroundHashParameters:
13
+ Enabled: true
14
+ EnforcedStyle: context_dependent
15
+
16
+ # Align `when` with `case`.
17
+ Layout/CaseIndentation:
18
+ Enabled: true
19
+
20
+ # Align comments with method definitions.
21
+ Layout/CommentIndentation:
22
+ Enabled: true
23
+
24
+ Layout/EmptyLineAfterMagicComment:
25
+ Enabled: true
26
+
27
+ # In a regular class definition, no empty lines around the body.
28
+ Layout/EmptyLinesAroundClassBody:
29
+ Enabled: true
30
+
31
+ # In a regular method definition, no empty lines around the body.
32
+ Layout/EmptyLinesAroundMethodBody:
33
+ Enabled: true
34
+
35
+ # In a regular module definition, no empty lines around the body.
36
+ Layout/EmptyLinesAroundModuleBody:
37
+ Enabled: true
38
+
39
+ Layout/FirstParameterIndentation:
40
+ Enabled: true
41
+
42
+ # Use Ruby >= 1.9 syntax for hashes. Prefer { a: :b } over { :a => :b }.
43
+ Style/HashSyntax:
44
+ Enabled: true
45
+
46
+ # Method definitions after `private` or `protected` isolated calls need one
47
+ # extra level of indentation.
48
+ Layout/IndentationConsistency:
49
+ Enabled: true
50
+ EnforcedStyle: rails
51
+
52
+ # Two spaces, no tabs (for indentation).
53
+ Layout/IndentationWidth:
54
+ Enabled: true
55
+
56
+ Layout/SpaceAfterColon:
57
+ Enabled: true
58
+
59
+ Layout/SpaceAfterComma:
60
+ Enabled: true
61
+
62
+ Layout/SpaceAroundEqualsInParameterDefault:
63
+ Enabled: true
64
+
65
+ Layout/SpaceAroundKeyword:
66
+ Enabled: true
67
+
68
+ Layout/SpaceAroundOperators:
69
+ Enabled: true
70
+
71
+ Layout/SpaceBeforeFirstArg:
72
+ Enabled: true
73
+
74
+ # Defining a method with parameters needs parentheses.
75
+ Style/MethodDefParentheses:
76
+ Enabled: true
77
+
78
+ Style/FrozenStringLiteralComment:
79
+ Enabled: true
80
+ EnforcedStyle: always
81
+ Exclude:
82
+ - 'actionview/test/**/*.builder'
83
+ - 'actionview/test/**/*.ruby'
84
+ - 'actionpack/test/**/*.builder'
85
+ - 'actionpack/test/**/*.ruby'
86
+ - 'activestorage/db/migrate/**/*.rb'
87
+
88
+ # Use `foo {}` not `foo{}`.
89
+ Layout/SpaceBeforeBlockBraces:
90
+ Enabled: true
91
+
92
+ # Use `foo { bar }` not `foo {bar}`.
93
+ Layout/SpaceInsideBlockBraces:
94
+ Enabled: true
95
+
96
+ # Use `{ a: 1 }` not `{a:1}`.
97
+ Layout/SpaceInsideHashLiteralBraces:
98
+ Enabled: true
99
+
100
+ Layout/SpaceInsideParens:
101
+ Enabled: true
102
+
103
+ # Check quotes usage according to lint rule below.
104
+ Style/StringLiterals:
105
+ Enabled: true
106
+ EnforcedStyle: double_quotes
107
+
108
+ # Detect hard tabs, no hard tabs.
109
+ Layout/Tab:
110
+ Enabled: true
111
+
112
+ # Blank lines should not have any spaces.
113
+ Layout/TrailingBlankLines:
114
+ Enabled: true
115
+
116
+ # No trailing whitespace.
117
+ Layout/TrailingWhitespace:
118
+ Enabled: true
119
+
120
+ # Use quotes for string literals when they are enough.
121
+ Style/UnneededPercentQ:
122
+ Enabled: true
123
+
124
+ # Align `end` with the matching keyword or starting expression except for
125
+ # assignments, where it should be aligned with the LHS.
126
+ Lint/EndAlignment:
127
+ Enabled: true
128
+ EnforcedStyleAlignWith: variable
129
+
130
+ # Use my_method(my_arg) not my_method( my_arg ) or my_method my_arg.
131
+ Lint/RequireParentheses:
132
+ Enabled: true
133
+
134
+ Style/RedundantReturn:
135
+ Enabled: true
136
+ AllowMultipleReturnValues: true
137
+
138
+ Style/Semicolon:
139
+ Enabled: true
140
+ AllowAsExpressionSeparator: true
@@ -0,0 +1,8 @@
1
+ inherit_from: .rails-rubocop.yml
2
+
3
+ AllCops:
4
+ Exclude:
5
+ - 'lib/active_merchant/billing/cyber_source_fix.rb'
6
+
7
+ Style/FrozenStringLiteralComment:
8
+ Enabled: false
@@ -0,0 +1,39 @@
1
+ Workarea Cyber Source 1.0.3 (2018-08-21)
2
+ --------------------------------------------------------------------------------
3
+
4
+ * Open Source!
5
+
6
+
7
+
8
+ Workarea Cyber Source 1.0.2 (2018-03-02)
9
+ --------------------------------------------------------------------------------
10
+
11
+ * Ensure address and email is passed to gateway calls
12
+
13
+ Update options in Authorize::CreditCard / Purcahse::CreditCard initializers so
14
+ address information is accessible StoreCreditCard
15
+ Override #add_payment_method_or_subscription to add the address when
16
+ using a token.
17
+
18
+ CYBERSRC-4
19
+ Eric Pigeon
20
+
21
+
22
+ Workarea Cyber Source 1.0.1 (2018-02-01)
23
+ --------------------------------------------------------------------------------
24
+
25
+ * Fix tokenizing credit cards
26
+
27
+ Cybersource can't use a token from an authorization for future
28
+ auths/purchases. Update Authorize::CreditCard and
29
+ Purchase::CreditCard to call StoreCreditCard first.
30
+
31
+ CYBERSRC-3
32
+ Eric Pigeon
33
+
34
+ * Add proxy from environment
35
+ Eric Pigeon
36
+
37
+
38
+ Workarea Cyber Source 1.0.0 (2017-12-20)
39
+ --------------------------------------------------------------------------------
@@ -0,0 +1,3 @@
1
+ View this plugin's code of conduct here:
2
+
3
+ <https://github.com/workarea-commerce/workarea/blob/master/CODE_OF_CONDUCT.md>
@@ -0,0 +1,3 @@
1
+ View this plugin's contribution guidelines here:
2
+
3
+ <https://github.com/workarea-commerce/workarea/blob/master/CONTRIBUTING.md>
data/Gemfile ADDED
@@ -0,0 +1,11 @@
1
+ source "https://rubygems.org"
2
+
3
+ gemspec
4
+
5
+ gem "workarea"
6
+ gem "rubocop", require: false
7
+
8
+ group :test do
9
+ gem "workarea-testing"
10
+ gem "simplecov", require: false
11
+ end
data/LICENSE ADDED
@@ -0,0 +1,52 @@
1
+ WebLinc
2
+ Business Source License
3
+
4
+ Licensor: WebLinc Corporation, 22 S. 3rd Street, 2nd Floor, Philadelphia PA 19106
5
+
6
+ Licensed Work: Workarea Commerce Platform
7
+ The Licensed Work is (c) 2019 WebLinc Corporation
8
+
9
+ Additional Use Grant:
10
+ You may make production use of the Licensed Work without an additional license agreement with WebLinc so long as you do not use the Licensed Work for a Commerce Service.
11
+
12
+ A "Commerce Service" is a commercial offering that allows third parties (other than your employees and contractors) to access the functionality of the Licensed Work by creating or managing commerce functionality, the products, taxonomy, assets and/or content of which are controlled by such third parties.
13
+
14
+ For information about obtaining an additional license agreement with WebLinc, contact licensing@workarea.com.
15
+
16
+ Change Date: 2019-08-20
17
+
18
+ Change License: Version 2.0 or later of the GNU General Public License as published by the Free Software Foundation
19
+
20
+ Terms
21
+
22
+ The Licensor hereby grants you the right to copy, modify, create derivative works, redistribute, and make non-production use of the Licensed Work. The Licensor may make an Additional Use Grant, above, permitting limited production use.
23
+
24
+ Effective on the Change Date, or the fourth anniversary of the first publicly available distribution of a specific version of the Licensed Work under this License, whichever comes first, the Licensor hereby grants you rights under the terms of the Change License, and the rights granted in the paragraph above terminate.
25
+
26
+ If your use of the Licensed Work does not comply with the requirements currently in effect as described in this License, you must purchase a commercial license from the Licensor, its affiliated entities, or authorized resellers, or you must refrain from using the Licensed Work.
27
+
28
+ All copies of the original and modified Licensed Work, and derivative works of the Licensed Work, are subject to this License. This License applies separately for each version of the Licensed Work and the Change Date may vary for each version of the Licensed Work released by Licensor.
29
+
30
+ You must conspicuously display this License on each original or modified copy of the Licensed Work. If you receive the Licensed Work in original or modified form from a third party, the terms and conditions set forth in this License apply to your use of that work.
31
+
32
+ Any use of the Licensed Work in violation of this License will automatically terminate your rights under this License for the current and all other versions of the Licensed Work.
33
+
34
+ This License does not grant you any right in any trademark or logo of Licensor or its affiliates (provided that you may use a trademark or logo of Licensor as expressly required by this License). TO THE EXTENT PERMITTED BY APPLICABLE LAW, THE LICENSED WORK IS PROVIDED ON AN "AS IS" BASIS. LICENSOR HEREBY DISCLAIMS ALL WARRANTIES AND CONDITIONS, EXPRESS OR IMPLIED, INCLUDING (WITHOUT LIMITATION) WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, AND TITLE. MariaDB hereby grants you permission to use this License’s text to license your works and to refer to it using the trademark "Business Source License" as long as you comply with the Covenants of Licensor below.
35
+
36
+ Covenants of Licensor
37
+ In consideration of the right to use this License’s text and the "Business Source License" name and trademark, Licensor covenants to MariaDB, and to all other recipients of the licensed work to be provided by Licensor:
38
+
39
+ To specify as the Change License the GPL Version 2.0 or any later version, or a license that is compatible with GPL Version 2.0 or a later version, where "compatible" means that software provided under the Change License can be included in a program with software provided under GPL Version 2.0 or a later version. Licensor may specify additional Change Licenses without limitation.
40
+
41
+ To either: (a) specify an additional grant of rights to use that does not impose any additional restriction on the right granted in this License, as the Additional Use Grant; or (b) insert the text "None."
42
+
43
+ To specify a Change Date.
44
+
45
+ Not to modify this License in any other way.
46
+
47
+ Notice
48
+ The Business Source License (this document, or the "License") is not an Open Source license. However, the Licensed Work will eventually be made available under an Open Source License, as stated in this License.
49
+
50
+ For more information on the use of the Business Source License generally, please visit the Adopting and Developing Business Source License FAQ.
51
+
52
+ License text copyright (c) 2017 MariaDB Corporation Ab, All Rights Reserved. "Business Source License" is a trademark of MariaDB Corporation Ab.
@@ -0,0 +1,27 @@
1
+ Workarea Cyber Source
2
+ ================================================================================
3
+
4
+ ## Installation
5
+
6
+ ### Secrets
7
+
8
+ ```yaml
9
+ cyber_source:
10
+ login: YOUR LOGIN
11
+ password: YOUR PASSWORD
12
+ ignore_avs: false # disable avs - set to true unless production
13
+ ignore_cvv: false # disable cvv - set to true unless production
14
+ test: true # ONLY FOR STAGING!! Uses the auth.net sandbox
15
+ ```
16
+
17
+ Workarea Platform Documentation
18
+ --------------------------------------------------------------------------------
19
+
20
+ See [http://developer.weblinc.com](http://developer.weblinc.com) for Workarea platform documentation.
21
+
22
+ Copyright & Licensing
23
+ --------------------------------------------------------------------------------
24
+
25
+ Copyright WebLinc 2017. All rights reserved.
26
+
27
+ For licensing, contact sales@workarea.com.
@@ -0,0 +1,59 @@
1
+ begin
2
+ require "bundler/setup"
3
+ rescue LoadError
4
+ puts "You must `gem install bundler` and `bundle install` to run rake tasks"
5
+ end
6
+
7
+ require "rdoc/task"
8
+ RDoc::Task.new(:rdoc) do |rdoc|
9
+ rdoc.rdoc_dir = "rdoc"
10
+ rdoc.title = "Cyber Source"
11
+ rdoc.options << "--line-numbers"
12
+ rdoc.rdoc_files.include("README.md")
13
+ rdoc.rdoc_files.include("lib/**/*.rb")
14
+ end
15
+
16
+ APP_RAKEFILE = File.expand_path("../test/dummy/Rakefile", __FILE__)
17
+ load "rails/tasks/engine.rake"
18
+ load "rails/tasks/statistics.rake"
19
+
20
+ require "rake/testtask"
21
+ Rake::TestTask.new(:test) do |t|
22
+ t.libs << "lib"
23
+ t.libs << "test"
24
+ t.pattern = "test/**/*_test.rb"
25
+ t.verbose = false
26
+ end
27
+ task default: :test
28
+
29
+ $LOAD_PATH.unshift File.expand_path("../lib", __FILE__)
30
+ require "workarea/cyber_source/version"
31
+
32
+ desc "Release version #{Workarea::CyberSource::VERSION} of the gem"
33
+ task :release do
34
+ host = "https://#{ENV['BUNDLE_GEMS__WEBLINC__COM']}@gems.weblinc.com"
35
+
36
+ #Rake::Task['workarea:changelog'].execute
37
+ #system 'git add CHANGELOG.md'
38
+ #system 'git commit -m "Update CHANGELOG"'
39
+ #system 'git push origin HEAD'
40
+
41
+ system "git tag -a v#{Workarea::CyberSource::VERSION} -m 'Tagging #{Workarea::CyberSource::VERSION}'"
42
+ system "git push --tags"
43
+
44
+ system "gem build workarea-cyber_source.gemspec"
45
+ system "gem push workarea-cyber_source-#{Workarea::CyberSource::VERSION}.gem"
46
+ system "gem push workarea-cyber_source-#{Workarea::CyberSource::VERSION}.gem --host #{host}"
47
+ system "rm workarea-cyber_source-#{Workarea::CyberSource::VERSION}.gem"
48
+ end
49
+
50
+ desc "Run the JavaScript tests"
51
+ ENV["TEASPOON_RAILS_ENV"] = File.expand_path("../test/dummy/config/environment", __FILE__)
52
+ task teaspoon: "app:teaspoon"
53
+
54
+ desc "Start a server at http://localhost:3000/teaspoon for JavaScript tests"
55
+ task :teaspoon_server do
56
+ Dir.chdir("test/dummy")
57
+ teaspoon_env = File.expand_path("../test/teaspoon_env.rb", __FILE__)
58
+ system "RAILS_ENV=test TEASPOON_ENV=#{teaspoon_env} rails s"
59
+ end