datewari 1.0.3 → 1.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 29e1a40dbb98a32173e09c56d42832aa27d6fdd4813fb51672d247082df14ec3
4
- data.tar.gz: 27b48717fbf73394a4803a15217b67c59380d266dcd101b023911c453d55f834
3
+ metadata.gz: d3d434d96cce244c1d00f2a8b28da3483c55b678f02e943b3bf6e4a454ec110f
4
+ data.tar.gz: fda63577285c31630b5b819e9becf9817472a3543b67f16cfa9ade122462a69a
5
5
  SHA512:
6
- metadata.gz: 6d06c483bd244395ccc0af4121699e89193e61169f4bde4efebff06560e511677bf4f45c3b15e3b9b9229ce8363d256398c31741fa7d35c446922dfcd7da5890
7
- data.tar.gz: eaddd825444df7d0cc5b577d34de836b8ed0de122cadca9ae61b1ed5d92006895d741292bbdb7d071f08df0c4c2918ea7ee70613ae0396d5022e711f5dbebcae
6
+ metadata.gz: 50ef817578c0d634d01d55015c0c41a4f5c31241377a6dffce4b5275b14e105821648948a2bf79c3711dc09a855ad86376fac28508b9c141a352f4b6f9148ea7
7
+ data.tar.gz: c28e9144ca9adfe464ea287c881a529e9fa2cc3f976ad8382975297db66cbbdd42ef71ecd7bd43c8127dab798ef7e39e5278ce9f74c950468d11bd288dca8b06
@@ -0,0 +1,96 @@
1
+ name: CI
2
+
3
+ on: [push, pull_request]
4
+
5
+ jobs:
6
+ test:
7
+ runs-on: ubuntu-22.04
8
+ services:
9
+ postgres:
10
+ image: postgis/postgis:15-3.4
11
+ env:
12
+ POSTGRES_USER: postgres
13
+ POSTGRES_PASSWORD: postgres
14
+ ports:
15
+ - 5432:5432
16
+ options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
17
+ mysql:
18
+ image: mysql:5.7
19
+ env:
20
+ MYSQL_ALLOW_EMPTY_PASSWORD: yes
21
+ ports:
22
+ - 3306:3306
23
+ options: --health-cmd "mysqladmin ping -h localhost" --health-interval 20s --health-timeout 10s --health-retries 10
24
+ strategy:
25
+ fail-fast: false
26
+ matrix:
27
+ ruby: [2.4, 2.5, 2.6, 2.7, '3.0', 3.1, 3.2, 3.3]
28
+ gemfile: ['rails50', 'rails51', 'rails52', 'rails60', 'rails61', 'rails70', 'rails71']
29
+ database: ['mysql', 'postgresql', 'postgis']
30
+ exclude:
31
+ - ruby: 2.4
32
+ gemfile: rails60
33
+ - ruby: 2.4
34
+ gemfile: rails61
35
+ - ruby: 2.4
36
+ gemfile: rails70
37
+ - ruby: 2.4
38
+ gemfile: rails71
39
+ - ruby: 2.5
40
+ gemfile: rails70
41
+ - ruby: 2.5
42
+ gemfile: rails71
43
+ - ruby: 2.6
44
+ gemfile: rails70
45
+ - ruby: 2.6
46
+ gemfile: rails71
47
+ - ruby: 2.7
48
+ gemfile: rails71
49
+ database: postgis
50
+ - ruby: 3.0
51
+ gemfile: rails50
52
+ - ruby: 3.0
53
+ gemfile: rails51
54
+ - ruby: 3.0
55
+ gemfile: rails52
56
+ - ruby: 3.1
57
+ gemfile: rails50
58
+ - ruby: 3.1
59
+ gemfile: rails51
60
+ - ruby: 3.1
61
+ gemfile: rails52
62
+ - ruby: 3.2
63
+ gemfile: rails50
64
+ - ruby: 3.2
65
+ gemfile: rails51
66
+ - ruby: 3.2
67
+ gemfile: rails52
68
+ - ruby: 3.3
69
+ gemfile: rails50
70
+ - ruby: 3.3
71
+ gemfile: rails51
72
+ - ruby: 3.3
73
+ gemfile: rails52
74
+
75
+ name: ruby ${{ matrix.ruby }}, ${{ matrix.gemfile }}, ${{ matrix.database }}
76
+
77
+ env:
78
+ DATABASE: ${{ matrix.database }}
79
+ POSTGRES_USER: postgres
80
+ POSTGRES_PASSWORD: postgres
81
+ BUNDLE_GEMFILE: gemfiles/${{ matrix.gemfile }}.gemfile
82
+
83
+ steps:
84
+ - uses: actions/checkout@v4
85
+ - uses: ruby/setup-ruby@v1
86
+ with:
87
+ ruby-version: ${{ matrix.ruby }}
88
+ bundler-cache: true
89
+ - name: Prepare test
90
+ run: |
91
+ cd spec/dummy
92
+ BUNDLE_GEMFILE=../../${{ env.BUNDLE_GEMFILE }} RAILS_ENV=test bundle exec rake db:create db:migrate db:seed
93
+ cd ../..
94
+ - name: Run test
95
+ run: |
96
+ bundle exec rspec
data/.gitignore CHANGED
@@ -1,15 +1,11 @@
1
1
  .bundle/
2
- .yardoc
3
2
  .project
4
3
  Gemfile.lock
5
- _yardoc/
6
4
  coverage/
7
- doc/
5
+ gemfiles/*.lock
8
6
  pkg/
9
- spec/reports/
10
7
  spec/dummy/config/database.yml
11
8
  spec/dummy/db/schema.rb
12
- spec/dummy/db/*.sqlite3
13
9
  spec/dummy/log/*.log
14
10
  spec/dummy/tmp/*
15
11
  tmp/
data/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## 1.1.1
4
+
5
+ * Add `frozen_string_literal: true`.
6
+
7
+ ## 1.1.0
8
+
9
+ * Drop support for ruby 2.3.
10
+
3
11
  ## 1.0.3
4
12
 
5
13
  * Support postgis adapter.
data/README.md CHANGED
@@ -4,7 +4,7 @@ An ActiveRecord extension to build date oriented pagination links such as monthl
4
4
 
5
5
  ## Dependencies
6
6
 
7
- * ruby 2.3+
7
+ * ruby 2.4+
8
8
  * rails 5.0+ (activerecord, activesupport, actionview)
9
9
 
10
10
  Following ActiveRecord adapters are supported:
data/datewari.gemspec CHANGED
@@ -26,8 +26,5 @@ Gem::Specification.new do |spec|
26
26
  spec.add_development_dependency "pg"
27
27
  spec.add_development_dependency "activerecord-postgis-adapter"
28
28
  spec.add_development_dependency "rspec-rails"
29
- spec.add_development_dependency "rails-controller-testing"
30
29
  spec.add_development_dependency "simplecov"
31
- spec.add_development_dependency "pry-rails"
32
- spec.add_development_dependency "pry-byebug"
33
30
  end
@@ -1,8 +1,9 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
3
  gem "rails", "~> 5.0.0"
4
- gem "mysql2", "~> 0.4.4"
4
+ gem "mysql2", "~> 0.5.0"
5
5
  gem "pg", "~> 0.18"
6
6
  gem "activerecord-postgis-adapter", "~> 4.1"
7
+ gem "loofah", "~> 2.19.1"
7
8
 
8
9
  gemspec path: "../"
@@ -1,8 +1,9 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
3
  gem "rails", "~> 5.1.0"
4
- gem "mysql2", "~> 0.4.4"
4
+ gem "mysql2", "~> 0.5.0"
5
5
  gem "pg", "~> 0.18"
6
6
  gem "activerecord-postgis-adapter", "~> 5.1"
7
+ gem "loofah", "~> 2.19.1"
7
8
 
8
9
  gemspec path: "../"
@@ -1,5 +1,6 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
3
  gem "rails", "~> 5.2.0"
4
+ gem "loofah", "~> 2.19.1"
4
5
 
5
6
  gemspec path: "../"
@@ -0,0 +1,6 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gem "rails", "~> 6.0.0"
4
+ gem "psych", "~> 3.3.0"
5
+
6
+ gemspec path: "../"
@@ -0,0 +1,5 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gem "rails", "~> 6.1.0"
4
+
5
+ gemspec path: "../"
@@ -0,0 +1,5 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gem "rails", "~> 7.0.1"
4
+
5
+ gemspec path: "../"
@@ -0,0 +1,5 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gem "rails", "~> 7.1.0"
4
+
5
+ gemspec path: "../"
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Datewari
2
4
  module Helper
3
5
  class LinkRenderer
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Datewari
2
4
  module Helper
3
5
  class PartsBuilder
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require_relative 'helper/link_renderer'
2
4
  require_relative 'helper/parts_builder'
3
5
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Datewari
2
4
  class Paginator
3
5
  class Base
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Datewari
2
4
  class Paginator
3
5
  class Mysql < Base
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Datewari
2
4
  class Paginator
3
5
  class Postgresql < Base
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require_relative 'paginator/base'
2
4
 
3
5
  module Datewari
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Datewari
2
4
  class Railtie < Rails::Railtie
3
5
  ActiveSupport.on_load :active_record do
data/lib/datewari/util.rb CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Datewari
2
4
  class Util
3
5
  class << self
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Datewari
2
- VERSION = '1.0.3'
4
+ VERSION = '1.1.1'
3
5
  end
data/lib/datewari.rb CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'datewari/version'
2
4
  require 'datewari/paginator'
3
5
  require 'datewari/helper'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: datewari
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.3
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yoshikazu Kaneta
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-07-10 00:00:00.000000000 Z
11
+ date: 2024-06-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -122,20 +122,6 @@ dependencies:
122
122
  - - ">="
123
123
  - !ruby/object:Gem::Version
124
124
  version: '0'
125
- - !ruby/object:Gem::Dependency
126
- name: rails-controller-testing
127
- requirement: !ruby/object:Gem::Requirement
128
- requirements:
129
- - - ">="
130
- - !ruby/object:Gem::Version
131
- version: '0'
132
- type: :development
133
- prerelease: false
134
- version_requirements: !ruby/object:Gem::Requirement
135
- requirements:
136
- - - ">="
137
- - !ruby/object:Gem::Version
138
- version: '0'
139
125
  - !ruby/object:Gem::Dependency
140
126
  name: simplecov
141
127
  requirement: !ruby/object:Gem::Requirement
@@ -150,34 +136,6 @@ dependencies:
150
136
  - - ">="
151
137
  - !ruby/object:Gem::Version
152
138
  version: '0'
153
- - !ruby/object:Gem::Dependency
154
- name: pry-rails
155
- requirement: !ruby/object:Gem::Requirement
156
- requirements:
157
- - - ">="
158
- - !ruby/object:Gem::Version
159
- version: '0'
160
- type: :development
161
- prerelease: false
162
- version_requirements: !ruby/object:Gem::Requirement
163
- requirements:
164
- - - ">="
165
- - !ruby/object:Gem::Version
166
- version: '0'
167
- - !ruby/object:Gem::Dependency
168
- name: pry-byebug
169
- requirement: !ruby/object:Gem::Requirement
170
- requirements:
171
- - - ">="
172
- - !ruby/object:Gem::Version
173
- version: '0'
174
- type: :development
175
- prerelease: false
176
- version_requirements: !ruby/object:Gem::Requirement
177
- requirements:
178
- - - ">="
179
- - !ruby/object:Gem::Version
180
- version: '0'
181
139
  description: An ActiveRecord extension to build date oriented pagination links such
182
140
  as monthly pages and weekly pages
183
141
  email:
@@ -186,9 +144,9 @@ executables: []
186
144
  extensions: []
187
145
  extra_rdoc_files: []
188
146
  files:
147
+ - ".github/workflows/ci.yml"
189
148
  - ".gitignore"
190
149
  - ".rspec"
191
- - ".travis.yml"
192
150
  - CHANGELOG.md
193
151
  - CODE_OF_CONDUCT.md
194
152
  - Gemfile
@@ -199,6 +157,10 @@ files:
199
157
  - gemfiles/rails50.gemfile
200
158
  - gemfiles/rails51.gemfile
201
159
  - gemfiles/rails52.gemfile
160
+ - gemfiles/rails60.gemfile
161
+ - gemfiles/rails61.gemfile
162
+ - gemfiles/rails70.gemfile
163
+ - gemfiles/rails71.gemfile
202
164
  - lib/datewari.rb
203
165
  - lib/datewari/helper.rb
204
166
  - lib/datewari/helper/link_renderer.rb
@@ -215,7 +177,7 @@ files:
215
177
  homepage: https://github.com/kanety/datewari
216
178
  licenses: []
217
179
  metadata: {}
218
- post_install_message:
180
+ post_install_message:
219
181
  rdoc_options: []
220
182
  require_paths:
221
183
  - lib
@@ -230,8 +192,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
230
192
  - !ruby/object:Gem::Version
231
193
  version: '0'
232
194
  requirements: []
233
- rubygems_version: 3.0.3
234
- signing_key:
195
+ rubygems_version: 3.3.3
196
+ signing_key:
235
197
  specification_version: 4
236
198
  summary: An ActiveRecord extension to build date oriented pagination links
237
199
  test_files: []
data/.travis.yml DELETED
@@ -1,28 +0,0 @@
1
- language: ruby
2
- rvm:
3
- - 2.3
4
- - 2.4
5
- - 2.5
6
- - 2.6
7
- services:
8
- - mysql
9
- - postgresql
10
- addons:
11
- postgresql: "9.5"
12
- apt:
13
- packages:
14
- - postgresql-9.5-postgis-2.3
15
- env:
16
- - DATABASE=mysql
17
- - DATABASE=postgresql
18
- - DATABASE=postgis
19
- gemfile:
20
- - gemfiles/rails50.gemfile
21
- - gemfiles/rails51.gemfile
22
- - gemfiles/rails52.gemfile
23
- before_script:
24
- - psql -U postgres -c "create extension postgis"
25
- - cd spec/dummy
26
- - bundle exec rake db:create db:migrate db:seed RAILS_ENV=test
27
- - cd ../..
28
- script: bundle exec rspec