Skip to content

Commit 84b7b97

Browse files
committed
bootstrap solidus extension
0 parents  commit 84b7b97

File tree

22 files changed

+564
-0
lines changed

22 files changed

+564
-0
lines changed

.gitignore

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
*.gem
2+
\#*
3+
*~
4+
.#*
5+
.DS_Store
6+
.idea
7+
.project
8+
.sass-cache
9+
coverage
10+
Gemfile.lock
11+
tmp
12+
nbproject
13+
pkg
14+
*.swp
15+
spec/dummy

.rspec

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
--color

.rubocop.yml

+231
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,231 @@
1+
# Relaxed.Ruby.Style
2+
3+
AllCops:
4+
Exclude:
5+
- 'spec/dummy/**/*'
6+
- 'vendor/bundle/**/*'
7+
TargetRubyVersion: 2.1
8+
9+
# Sometimes I believe this reads better
10+
# This also causes spacing issues on multi-line fixes
11+
Style/BracesAroundHashParameters:
12+
Enabled: false
13+
14+
# We use class vars and will have to continue doing so for compatability
15+
Style/ClassVars:
16+
Enabled: false
17+
18+
# We need these names for backwards compatability
19+
Style/PredicateName:
20+
Enabled: false
21+
22+
Style/AccessorMethodName:
23+
Enabled: false
24+
25+
# This has been used for customization
26+
Style/MutableConstant:
27+
Enabled: false
28+
29+
Style/ClassAndModuleChildren:
30+
Enabled: false
31+
32+
Style/GuardClause:
33+
Enabled: false
34+
35+
Style/WordArray:
36+
Enabled: false
37+
38+
Style/ConditionalAssignment:
39+
Enabled: false
40+
41+
Performance/Count:
42+
Enabled: false
43+
44+
Style/RaiseArgs:
45+
Enabled: false
46+
47+
Style/OpMethod:
48+
Enabled: false
49+
50+
# We can use good judgement here
51+
Style/RegexpLiteral:
52+
Enabled: false
53+
54+
# Unicode comments are useful
55+
Style/AsciiComments:
56+
Enabled: false
57+
58+
Lint/EndAlignment:
59+
Enabled: false
60+
61+
Style/ElseAlignment:
62+
Enabled: false
63+
64+
Style/IndentationWidth:
65+
Enabled: false
66+
67+
Style/AlignParameters:
68+
Enabled: false
69+
70+
Style/ClosingParenthesisIndentation:
71+
Enabled: false
72+
73+
Style/MultilineMethodCallIndentation:
74+
Enabled: false
75+
76+
Style/IndentArray:
77+
Enabled: false
78+
79+
Style/IndentHash:
80+
Enabled: false
81+
82+
Style/AlignHash:
83+
Enabled: false
84+
85+
# From http://relaxed.ruby.style/
86+
87+
Style/Alias:
88+
Enabled: false
89+
StyleGuide: http://relaxed.ruby.style/#stylealias
90+
91+
Style/BeginBlock:
92+
Enabled: false
93+
StyleGuide: http://relaxed.ruby.style/#stylebeginblock
94+
95+
Style/BlockDelimiters:
96+
Enabled: false
97+
StyleGuide: http://relaxed.ruby.style/#styleblockdelimiters
98+
99+
Style/Documentation:
100+
Enabled: false
101+
StyleGuide: http://relaxed.ruby.style/#styledocumentation
102+
103+
Style/DotPosition:
104+
Enabled: false
105+
StyleGuide: http://relaxed.ruby.style/#styledotposition
106+
107+
Style/DoubleNegation:
108+
Enabled: false
109+
StyleGuide: http://relaxed.ruby.style/#styledoublenegation
110+
111+
Style/EndBlock:
112+
Enabled: false
113+
StyleGuide: http://relaxed.ruby.style/#styleendblock
114+
115+
Style/FormatString:
116+
Enabled: false
117+
StyleGuide: http://relaxed.ruby.style/#styleformatstring
118+
119+
Style/IfUnlessModifier:
120+
Enabled: false
121+
StyleGuide: http://relaxed.ruby.style/#styleifunlessmodifier
122+
123+
Style/Lambda:
124+
Enabled: false
125+
StyleGuide: http://relaxed.ruby.style/#stylelambda
126+
127+
Style/ModuleFunction:
128+
Enabled: false
129+
StyleGuide: http://relaxed.ruby.style/#stylemodulefunction
130+
131+
Style/MultilineBlockChain:
132+
Enabled: false
133+
StyleGuide: http://relaxed.ruby.style/#stylemultilineblockchain
134+
135+
Style/NegatedIf:
136+
Enabled: false
137+
StyleGuide: http://relaxed.ruby.style/#stylenegatedif
138+
139+
Style/NegatedWhile:
140+
Enabled: false
141+
StyleGuide: http://relaxed.ruby.style/#stylenegatedwhile
142+
143+
Style/ParallelAssignment:
144+
Enabled: false
145+
StyleGuide: http://relaxed.ruby.style/#styleparallelassignment
146+
147+
Style/PercentLiteralDelimiters:
148+
Enabled: false
149+
StyleGuide: http://relaxed.ruby.style/#stylepercentliteraldelimiters
150+
151+
Style/PerlBackrefs:
152+
Enabled: false
153+
StyleGuide: http://relaxed.ruby.style/#styleperlbackrefs
154+
155+
Style/Semicolon:
156+
Enabled: false
157+
StyleGuide: http://relaxed.ruby.style/#stylesemicolon
158+
159+
Style/SignalException:
160+
Enabled: false
161+
StyleGuide: http://relaxed.ruby.style/#stylesignalexception
162+
163+
Style/SingleLineBlockParams:
164+
Enabled: false
165+
StyleGuide: http://relaxed.ruby.style/#stylesinglelineblockparams
166+
167+
Style/SingleLineMethods:
168+
Enabled: false
169+
StyleGuide: http://relaxed.ruby.style/#stylesinglelinemethods
170+
171+
Style/SpaceBeforeBlockBraces:
172+
Enabled: false
173+
StyleGuide: http://relaxed.ruby.style/#stylespacebeforeblockbraces
174+
175+
Style/SpaceInsideParens:
176+
Enabled: false
177+
StyleGuide: http://relaxed.ruby.style/#stylespaceinsideparens
178+
179+
Style/SpecialGlobalVars:
180+
Enabled: false
181+
StyleGuide: http://relaxed.ruby.style/#stylespecialglobalvars
182+
183+
Style/StringLiterals:
184+
Enabled: false
185+
StyleGuide: http://relaxed.ruby.style/#stylestringliterals
186+
187+
Style/SymbolProc:
188+
Enabled: false
189+
190+
Style/WhileUntilModifier:
191+
Enabled: false
192+
StyleGuide: http://relaxed.ruby.style/#stylewhileuntilmodifier
193+
194+
Lint/AmbiguousRegexpLiteral:
195+
Enabled: false
196+
StyleGuide: http://relaxed.ruby.style/#lintambiguousregexpliteral
197+
198+
Lint/AssignmentInCondition:
199+
Enabled: false
200+
StyleGuide: http://relaxed.ruby.style/#lintassignmentincondition
201+
202+
Lint/HandleExceptions:
203+
Exclude:
204+
- 'Rakefile'
205+
206+
Metrics/AbcSize:
207+
Enabled: false
208+
209+
Metrics/BlockNesting:
210+
Enabled: false
211+
212+
Metrics/ClassLength:
213+
Enabled: false
214+
215+
Metrics/ModuleLength:
216+
Enabled: false
217+
218+
Metrics/CyclomaticComplexity:
219+
Enabled: false
220+
221+
Metrics/LineLength:
222+
Enabled: false
223+
224+
Metrics/MethodLength:
225+
Enabled: false
226+
227+
Metrics/ParameterLists:
228+
Enabled: false
229+
230+
Metrics/PerceivedComplexity:
231+
Enabled: false

.travis.yml

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
sudo: false
2+
cache: bundler
3+
language: ruby
4+
bundler_args: --quiet
5+
script:
6+
- bundle exec rake
7+
rvm:
8+
- 2.1.5

Gemfile

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
source 'https://rubygems.org'
2+
3+
gem 'solidus', github: 'solidusio/solidus'
4+
# Provides basic authentication functionality for testing parts of your engine
5+
gem 'solidus_auth_devise', '~> 1.0'
6+
7+
gemspec

LICENSE

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
Copyright (c) 2017 [name of plugin creator]
2+
All rights reserved.
3+
4+
Redistribution and use in source and binary forms, with or without modification,
5+
are permitted provided that the following conditions are met:
6+
7+
* Redistributions of source code must retain the above copyright notice,
8+
this list of conditions and the following disclaimer.
9+
* Redistributions in binary form must reproduce the above copyright notice,
10+
this list of conditions and the following disclaimer in the documentation
11+
and/or other materials provided with the distribution.
12+
* Neither the name Spree nor the names of its contributors may be used to
13+
endorse or promote products derived from this software without specific
14+
prior written permission.
15+
16+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
17+
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
18+
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
19+
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
20+
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
21+
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
22+
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
23+
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
24+
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
25+
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
26+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

README.md

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
SolidusPayuLatam
2+
================
3+
4+
Introduction goes here.
5+
6+
Installation
7+
------------
8+
9+
Add solidus_payu_latam to your Gemfile:
10+
11+
```ruby
12+
gem 'solidus_payu_latam'
13+
```
14+
15+
Bundle your dependencies and run the installation generator:
16+
17+
```shell
18+
bundle
19+
bundle exec rails g solidus_payu_latam:install
20+
```
21+
22+
Testing
23+
-------
24+
25+
First bundle your dependencies, then run `rake`. `rake` will default to building the dummy app if it does not exist, then it will run specs, and [Rubocop](https://github.com/bbatsov/rubocop) static code analysis. The dummy app can be regenerated by using `rake test_app`.
26+
27+
```shell
28+
bundle
29+
bundle exec rake
30+
```
31+
32+
When testing your applications integration with this extension you may use it's factories.
33+
Simply add this require statement to your spec_helper:
34+
35+
```ruby
36+
require 'solidus_payu_latam/factories'
37+
```
38+
39+
Copyright (c) 2017 [name of extension creator], released under the New BSD License

Rakefile

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
require 'bundler'
2+
3+
Bundler::GemHelper.install_tasks
4+
5+
begin
6+
require 'spree/testing_support/extension_rake'
7+
require 'rubocop/rake_task'
8+
require 'rspec/core/rake_task'
9+
10+
RSpec::Core::RakeTask.new(:spec)
11+
12+
RuboCop::RakeTask.new
13+
14+
task default: %i(first_run rubocop spec)
15+
rescue LoadError
16+
# no rspec available
17+
end
18+
19+
task :first_run do
20+
if Dir['spec/dummy'].empty?
21+
Rake::Task[:test_app].invoke
22+
Dir.chdir('../../')
23+
end
24+
end
25+
26+
desc 'Generates a dummy app for testing'
27+
task :test_app do
28+
ENV['LIB_NAME'] = 'solidus_payu_latam'
29+
Rake::Task['extension:test_app'].invoke
30+
end
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
// Placeholder manifest file.
2+
// the installer will append this file to the app vendored assets here: vendor/assets/javascripts/spree/backend/all.js'
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
// Placeholder manifest file.
2+
// the installer will append this file to the app vendored assets here: vendor/assets/javascripts/spree/frontend/all.js'
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
/*
2+
Placeholder manifest file.
3+
the installer will append this file to the app vendored assets here: 'vendor/assets/stylesheets/spree/backend/all.css'
4+
*/
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
/*
2+
Placeholder manifest file.
3+
the installer will append this file to the app vendored assets here: 'vendor/assets/stylesheets/spree/frontend/all.css'
4+
*/

bin/rails

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application.
2+
3+
ENGINE_ROOT = File.expand_path('../..', __FILE__)
4+
ENGINE_PATH = File.expand_path('../../lib/solidus_payu_latam/engine', __FILE__)
5+
6+
require 'rails/all'
7+
require 'rails/engine/commands'

config/locales/en.yml

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Sample localization file for English. Add more files in this directory for other locales.
2+
# See https://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points.
3+
4+
en:
5+
hello: Hello world

0 commit comments

Comments
 (0)