Skip to content

Commit a140142

Browse files
authored
Merge pull request solidusio#168 from blocknotes/master
Upgrade the extension using solidus_dev_support
2 parents 30848aa + 3bed1d7 commit a140142

18 files changed

Lines changed: 189 additions & 83 deletions

File tree

.gem_release.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
bump:
2+
recurse: false
3+
file: 'lib/solidus_i18n/version.rb'
4+
message: Bump SolidusI18n to %{version}
5+
tag: true

.github/stale.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Number of days of inactivity before an issue becomes stale
2+
daysUntilStale: 60
3+
# Number of days of inactivity before a stale issue is closed
4+
daysUntilClose: 7
5+
# Issues with these labels will never be considered stale
6+
exemptLabels:
7+
- pinned
8+
- security
9+
# Label to use when marking an issue as stale
10+
staleLabel: wontfix
11+
# Comment to post when marking an issue as stale. Set to `false` to disable
12+
markComment: >
13+
This issue has been automatically marked as stale because it has not had
14+
recent activity. It will be closed if no further activity occurs. Thank you
15+
for your contributions.
16+
# Comment to post when closing a stale issue. Set to `false` to disable
17+
closeComment: false

.gitignore

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,16 @@
1+
*.gem
12
\#*
23
*~
34
.#*
45
.DS_Store
56
.idea
6-
.localeapp/locales
77
.project
8+
.sass-cache
89
coverage
9-
config/locales/en.yml
1010
Gemfile.lock
1111
tmp
1212
nbproject
1313
pkg
14-
*.sw?
14+
*.swp
1515
spec/dummy
16-
.rvmrc
17-
.sass-cache
18-
public/spree
19-
.ruby-gemset
16+
spec/examples.txt

.rspec

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
--color
2+
--require spec_helper

.rubocop.yml

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,4 @@
1-
---
2-
inherit_from: .hound.yml
1+
require:
2+
- solidus_dev_support/rubocop
33

4-
Metrics/BlockLength:
5-
Exclude:
6-
- spec/**/*
7-
- lib/tasks/**/*
8-
9-
AllCops:
10-
Exclude:
11-
- 'spec/dummy/**/*'
12-
- 'bin/**/*'
13-
- 'vendor/**/*'
4+
inherit_from: .rubocop_todo.yml

.rubocop_todo.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# This configuration was generated by
2+
# `rubocop --auto-gen-config`
3+
# on 2020-01-24 11:23:54 +0100 using RuboCop version 0.76.0.
4+
# The point is for the user to remove these configuration records
5+
# one by one as the offenses are removed from the code base.
6+
# Note that changes in the inspected code, or installation of new
7+
# versions of RuboCop, may require this file to be generated again.
8+
9+
# Offense count: 1
10+
RSpec/DescribeClass:
11+
Exclude:
12+
- 'spec/solidus_i18n_spec.rb'
13+
14+
# Offense count: 2
15+
# Configuration parameters: IgnoreSharedExamples.
16+
RSpec/NamedSubject:
17+
Exclude:
18+
- 'spec/solidus_i18n_spec.rb'

Gemfile

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,31 @@
11
# frozen_string_literal: true
22

33
source 'https://rubygems.org'
4+
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
45

56
branch = ENV.fetch('SOLIDUS_BRANCH', 'master')
67
gem 'solidus', github: 'solidusio/solidus', branch: branch
78

8-
if ENV['DB'] == 'mysql'
9-
gem 'mysql2', '~> 0.4.10'
9+
# Needed to help Bundler figure out how to resolve dependencies,
10+
# otherwise it takes forever to resolve them.
11+
# See https://github.com/bundler/bundler/issues/6677
12+
gem 'rails', '>0.a'
13+
14+
case ENV['DB']
15+
when 'mysql'
16+
gem 'mysql2'
17+
when 'postgresql'
18+
gem 'pg'
1019
else
11-
gem 'pg', '~> 0.21'
20+
gem 'sqlite3'
1221
end
1322

1423
group :development, :test do
1524
gem 'i18n-tasks', '~> 0.9' if branch == 'master'
16-
gem 'pry-rails'
1725
end
1826

1927
gemspec
28+
29+
# Use a local Gemfile to include development dependencies that might not be
30+
# relevant for the project or for other contributors, e.g.: `gem 'pry-debug'`.
31+
eval_gemfile 'Gemfile-local' if File.exist? 'Gemfile-local'

LICENSE.md renamed to LICENSE

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2011-2015 Spree Commerce Inc., and other contributors.
1+
Copyright (c) 2011-2015 Spree Commerce Inc. and other contributors
22
All rights reserved.
33

44
Redistribution and use in source and binary forms, with or without modification,
@@ -9,7 +9,7 @@ are permitted provided that the following conditions are met:
99
* Redistributions in binary form must reproduce the above copyright notice,
1010
this list of conditions and the following disclaimer in the documentation
1111
and/or other materials provided with the distribution.
12-
* Neither the name Spree nor the names of its contributors may be used to
12+
* Neither the name Solidus nor the names of its contributors may be used to
1313
endorse or promote products derived from this software without specific
1414
prior written permission.
1515

Rakefile

Lines changed: 5 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,12 @@
11
# frozen_string_literal: true
22

3-
require 'bundler'
4-
Bundler::GemHelper.install_tasks
5-
6-
require 'rspec/core/rake_task'
7-
RSpec::Core::RakeTask.new
8-
9-
task :default do
10-
if Dir['spec/dummy'].empty?
11-
Rake::Task[:test_app].invoke
12-
Dir.chdir('../../')
13-
end
14-
Rake::Task[:spec].invoke
15-
end
16-
17-
require 'spree/testing_support/common_rake'
18-
desc 'Generates a dummy app for testing'
19-
task :test_app do
20-
ENV['LIB_NAME'] = 'solidus_i18n'
21-
Rake::Task['common:test_app'].invoke
22-
end
3+
require 'solidus_dev_support/rake_tasks'
4+
SolidusDevSupport::RakeTasks.install
235

246
require 'solidus_i18n'
257
namespace :solidus_i18n do
268
desc 'Update by retrieving the latest Solidus locale files'
27-
task :update_default do
9+
task update_default: :environment do
2810
require 'open-uri'
2911
puts 'Fetching latest Solidus locale file'
3012
location = 'https://raw.github.com/solidusio/solidus/master/core/config/locales/en.yml'
@@ -36,3 +18,5 @@ namespace :solidus_i18n do
3618
File.join File.dirname(__FILE__), 'config/locales'
3719
end
3820
end
21+
22+
task default: 'extension:specs'

bin/console

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/usr/bin/env ruby
2+
3+
# frozen_string_literal: true
4+
5+
require "bundler/setup"
6+
require "solidus_i18n"
7+
8+
# You can add fixtures and/or initialization code here to make experimenting
9+
# with your gem easier. You can also use a different console, if you like.
10+
$LOAD_PATH.unshift(*Dir["#{__dir__}/../app/*"])
11+
12+
# (If you use this, don't forget to add pry to your Gemfile!)
13+
# require "pry"
14+
# Pry.start
15+
16+
require "irb"
17+
IRB.start(__FILE__)

0 commit comments

Comments
 (0)