stringify_date 0.0.1 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: bd5804a988d289ea11a6fc8d7712d3199954343f
4
- data.tar.gz: 4da4feeacc1a9417d2ce3d0d4acb0063bf18d657
2
+ SHA256:
3
+ metadata.gz: bd301ddc54c6aa6c1bc9ee56cc93ffdabd8c6c86f99e37bfad5f277352741bc2
4
+ data.tar.gz: 7e974e20bffdad47ebaa6297ae40c1e72e4c48b878bb473ea880110439cb052f
5
5
  SHA512:
6
- metadata.gz: 64b95255f1d1f33c8ed3c4cd3cf61472b167a06051177bdb9411fbc94e84d914eeb31c6ed7269ba4c214f024d7a2d6005fabdcde34c5aa9014ffa1bb24c6e248
7
- data.tar.gz: b3ed078b45b63e2fd1b224efaa5ba4108c49c32a42b5aa88007a3d11f62ece1a4b091e8d30b3956d6eb9c23f4efcbf4f062920190ef91216503067b0341085e7
6
+ metadata.gz: 329af031309954f55ffe2fff799fb7e541c08fa02e1c54de2b4bbc8b99ff51076ca7d2e79e634694eec35588cab0c6a915999682b8e8f23bf072fe772a87f11e
7
+ data.tar.gz: 6f8a9a2d1eb84350ca1809fa5ef49e7f5265ef155d816dc359ac408d1d4ed9bad5a5275bf67f722ea2f8c353c0fe3d67a8a6ffb62f9ee68682ab111d4c2bdd90
data/.gitignore CHANGED
@@ -3,6 +3,7 @@
3
3
  .bundle
4
4
  .config
5
5
  .yardoc
6
+ .DS_Store
6
7
  Gemfile.lock
7
8
  InstalledFiles
8
9
  _yardoc
@@ -20,3 +21,4 @@ tmp
20
21
  *.o
21
22
  *.a
22
23
  mkmf.log
24
+ spec/dummy/log/test.log
@@ -0,0 +1,14 @@
1
+ language: ruby
2
+ script:
3
+ - 'bundle exec rspec'
4
+
5
+ rvm:
6
+ - 2.3
7
+ - 2.4
8
+ - 2.5
9
+ - 2.6
10
+ - 2.7
11
+
12
+ before_install:
13
+ - gem update --system
14
+ - gem update bundler
@@ -0,0 +1,14 @@
1
+ FROM ruby:2.6-alpine
2
+
3
+ RUN apk --update --no-cache add build-base sqlite-dev libffi-dev git tzdata
4
+
5
+ RUN mkdir /app
6
+ WORKDIR /app
7
+ ADD . /app
8
+
9
+ ENV BUNDLE_PATH=/bundle \
10
+ BUNDLE_BIN=/bundle/bin \
11
+ GEM_HOME=/bundle
12
+ ENV PATH="${BUNDLE_BIN}:${PATH}"
13
+
14
+ RUN gem install bundler && bundle install
data/README.md CHANGED
@@ -1,3 +1,5 @@
1
+ [![Build Status](https://travis-ci.org/matheusvetor/stringify_date.svg?branch=master)](https://travis-ci.org/matheusvetor/stringify_date)
2
+
1
3
  # StringifyDate
2
4
 
3
5
  This gem provides a _string and _string= to date and datetime attributes.
@@ -24,7 +26,7 @@ and we want to handle it by using a String object instead:
24
26
  ```ruby
25
27
  class Product < ActiveRecord::Base
26
28
  # the format will be used to format date and datetime as string
27
- stringify :validity, format: '%Y-%m-%d'
29
+ stringify :validity, format: '%d/%m/%Y'
28
30
 
29
31
  end
30
32
  ```
@@ -32,6 +34,19 @@ end
32
34
  Now each Product object will also have attributes called ```validity_string``` and ```validity_string=```
33
35
  to use date and datetime as string.
34
36
 
37
+ So
38
+
39
+ ```ruby
40
+ product = Product.new validity: Date.new(2001,2,3)
41
+ ```
42
+
43
+ We can use now ```_string```
44
+
45
+ ```ruby
46
+ product.validity_string # => '03/02/2001'
47
+ ```
48
+
49
+
35
50
  ## Contributing
36
51
 
37
52
  1. Fork it ( https://github.com/matheusvetor/stringify_date/fork )
data/Rakefile CHANGED
@@ -1,2 +1 @@
1
- require "bundler/gem_tasks"
2
-
1
+ require 'bundler/gem_tasks'
@@ -0,0 +1,11 @@
1
+ version: "3.7"
2
+ services:
3
+ gem:
4
+ build: .
5
+ command: bundle exec rspec
6
+ volumes:
7
+ - bundle_cache:/bundle
8
+ - .:/app
9
+
10
+ volumes:
11
+ bundle_cache:
@@ -1,4 +1,4 @@
1
- require "stringify_date/version"
1
+ require 'stringify_date/version'
2
2
  require 'stringify_date/active_record/stringify'
3
3
 
4
4
  module StringifyDate
@@ -1,3 +1,4 @@
1
+ require 'active_record'
1
2
  require 'active_support/concern'
2
3
  require 'active_support/core_ext/array/extract_options'
3
4
 
@@ -6,26 +7,39 @@ module StringifyDate
6
7
  module Stringify
7
8
  extend ActiveSupport::Concern
8
9
 
10
+ def parse_value(name, value, format)
11
+ return nil unless value.present?
12
+
13
+ begin
14
+ Time.zone.strptime(value, format)
15
+ rescue ArgumentError
16
+ instance_variable_set("@#{name}_invalid", true)
17
+ nil
18
+ end
19
+ end
20
+
9
21
  module ClassMethods
10
22
  def stringify(field, *args)
11
23
  column_name = field.to_s
12
-
13
- options = args.extract_options!
14
-
15
- name = [column_name, 'string'].join('_')
24
+ options = args.extract_options!
25
+ format = options[:format] || '%Y-%m-%d'
26
+ name = [column_name, 'string'].join('_')
16
27
 
17
28
  define_method name do
18
29
  date = send(column_name)
19
- date.strftime(options[:format]) unless date.nil?
30
+ date.strftime(format) if date.present?
20
31
  end
21
32
 
22
33
  define_method "#{name}=" do |value|
23
- type = self.class.columns_hash[column_name].type
24
- types = { datetime: DateTime, date: Date }
25
- if value && type.in?([:date, :datetime])
26
- self.send("#{column_name}=", types[type].send('parse', value))
27
- end
34
+ parsed_value = parse_value(name, value, format)
35
+ send("#{column_name}=", parsed_value)
36
+ end
37
+
38
+ define_method "validate_#{name}" do
39
+ errors.add(name.to_sym, I18n.t('errors.invalid')) if instance_variable_get("@#{name}_invalid")
28
40
  end
41
+
42
+ send(:validate, :"validate_#{name}")
29
43
  end
30
44
  end
31
45
  end
@@ -1,3 +1,3 @@
1
1
  module StringifyDate
2
- VERSION = "0.0.1"
2
+ VERSION = '0.1.1'.freeze
3
3
  end
@@ -0,0 +1,86 @@
1
+ require 'spec_helper'
2
+
3
+ describe StringifyDate::ActiveRecord::Stringify do
4
+ before { Time.zone = 'Eastern Time (US & Canada)' }
5
+
6
+ let(:test_date) do
7
+ TestDate.new(start_at: Date.today, end_at: DateTime.now)
8
+ end
9
+
10
+ let(:test_date_string) do
11
+ TestDate.new(start_at_string: Date.today.to_s, end_at_string: DateTime.now.to_s)
12
+ end
13
+
14
+ it 'responds to #stringify' do
15
+ expect(TestDate).to respond_to(:stringify)
16
+ end
17
+
18
+ it 'responds to _string and _string=' do
19
+ expect(test_date).to respond_to(:start_at_string)
20
+ expect(test_date).to respond_to(:start_at_string=)
21
+ expect(test_date).to respond_to(:end_at_string)
22
+ expect(test_date).to respond_to(:end_at_string=)
23
+ expect(test_date).to respond_to(:published_at_string)
24
+ expect(test_date).to respond_to(:published_at_string=)
25
+ end
26
+
27
+ it 'sets start_at_string to 22/10/2012 when start_at 2012-10-22 and stringify format is "%d/%m/%Y"' do
28
+ test_date.start_at = Date.new(2012, 10, 22)
29
+
30
+ expect(test_date.start_at_string).to eq('22/10/2012')
31
+ end
32
+
33
+ it 'is invalid when parse invalid date' do
34
+ test_date.start_at_string = 'invalid'
35
+
36
+ expect(test_date.valid?).to be(false)
37
+ end
38
+
39
+ it 'real attribute is nil when parse invalid date' do
40
+ test_date.start_at_string = 'invalid'
41
+
42
+ expect(test_date.start_at).to be(nil)
43
+ end
44
+
45
+ it 'is valid when parse empty string' do
46
+ test_date.start_at_string = ''
47
+
48
+ expect(test_date.valid?).to be(true)
49
+ end
50
+
51
+ it 'sets start_at to 31/10/2001 when start_at 2001-02-03 and stringify format is "%d/%m/%Y %H:%M:%S"' do
52
+ test_date.start_at_string = '31/10/2001 02:02:02'
53
+
54
+ expect(test_date.start_at).to eq(Date.new(2001, 10, 31))
55
+ end
56
+
57
+ it 'sets end_at to 31/10/2001 when start_at 2001-02-03 and stringify format is "%d/%m/%Y %H:%M:%S"' do
58
+ test_date.end_at_string = '31/10/2001 02:02:02 -0300'
59
+
60
+ expect(test_date.end_at).to eq(Time.new(2001, 10, 31, 2, 2, 2, '-05:00'))
61
+ end
62
+
63
+ it 'sets end_at to 31/10/2001 when start_at 2001-02-03 and stringify format is "%d/%m/%Y %H:%M:%S"' do
64
+ test_date.end_at_string = '31/10/2001 00:00:00 -0300'
65
+
66
+ expect(test_date.end_at).to eq(Time.new(2001, 10, 31, 0, 0, 0, '-05:00'))
67
+ end
68
+
69
+ it 'sets published_at_string to 2001-02-03 when published_at 2001-02-03 and stringify format is not passing' do
70
+ test_date.published_at = DateTime.new(2001, 2, 3)
71
+
72
+ expect(test_date.published_at_string).to eq('2001-02-03')
73
+ end
74
+
75
+ it 'sets end_at_string to 22/10/2001 when start_at 2001-02-03 and stringify format is "%d/%m/%Y %H:%M:%S"' do
76
+ test_date.end_at = Date.new(2001, 2, 3)
77
+
78
+ expect(test_date.end_at_string).to eq('03/02/2001 00:00:00')
79
+ end
80
+
81
+ it 'sets end_at_string to 31/10/2002 when start_at 2001-02-03 and stringify format is "%d/%m/%Y %H:%M:%S"' do
82
+ test_date.end_at = Time.new(2002, 10, 31, 2, 2, 2, '-05:00')
83
+
84
+ expect(test_date.end_at_string).to eq('31/10/2002 02:02:02')
85
+ end
86
+ end
@@ -1,4 +1,5 @@
1
1
  class TestDate < ActiveRecord::Base
2
- stringify :start_at, format: "%d/%m/%Y"
3
- stringify :end_at, format: "%d/%m/%Y %H:%I:%S"
2
+ stringify :start_at, format: '%d/%m/%Y'
3
+ stringify :end_at, format: '%d/%m/%Y %H:%M:%S'
4
+ stringify :published_at
4
5
  end
@@ -1,29 +1,16 @@
1
1
  require File.expand_path('../boot', __FILE__)
2
2
 
3
3
  # Pick the frameworks you want:
4
- require "active_record/railtie"
5
- require "action_controller/railtie"
6
- require "action_mailer/railtie"
7
- require "action_view/railtie"
8
- require "sprockets/railtie"
9
- # require "rails/test_unit/railtie"
4
+ require 'active_record/railtie'
5
+ require 'action_controller/railtie'
6
+ require 'action_mailer/railtie'
10
7
 
11
8
  Bundler.require(*Rails.groups)
12
- require "stringfy_date"
9
+ require 'stringify_date'
13
10
 
14
11
  module Dummy
15
12
  class Application < Rails::Application
16
- # Settings in config/environments/* take precedence over those specified here.
17
- # Application configuration should go into files in config/initializers
18
- # -- all .rb files in that directory are automatically loaded.
19
-
20
- # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
21
- # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
22
- # config.time_zone = 'Central Time (US & Canada)'
23
-
24
- # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
25
- # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
26
- # config.i18n.default_locale = :de
13
+ config.time_zone = 'Brasilia'
27
14
  end
28
15
  end
29
16
 
@@ -0,0 +1,5 @@
1
+ class AddPublishedAtToTestDates < ActiveRecord::Migration
2
+ def change
3
+ add_column :test_dates, :published_at, :date
4
+ end
5
+ end
@@ -11,11 +11,12 @@
11
11
  #
12
12
  # It's strongly recommended that you check this file into your version control system.
13
13
 
14
- ActiveRecord::Schema.define(version: 20140629010823) do
14
+ ActiveRecord::Schema.define(version: 20140920052550) do
15
15
 
16
16
  create_table "test_dates", force: true do |t|
17
17
  t.date "start_at"
18
18
  t.datetime "end_at"
19
+ t.date "published_at"
19
20
  end
20
21
 
21
22
  end
@@ -8,3 +8,10 @@ Migrating to CreateTestDates (20140629010823)
8
8
  SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20140629010823"]]
9
9
   (1.7ms) commit transaction
10
10
  ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
11
+ ActiveRecord::SchemaMigration Load (0.5ms) SELECT "schema_migrations".* FROM "schema_migrations"
12
+ Migrating to AddPublishedAtToTestDates (20140920052550)
13
+  (0.1ms) begin transaction
14
+  (6.3ms) ALTER TABLE "test_dates" ADD "published_at" date
15
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20140920052550"]]
16
+  (13.5ms) commit transaction
17
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
@@ -0,0 +1,7 @@
1
+ ENV['RAILS_ENV'] = 'test'
2
+
3
+ require File.expand_path('../../spec/dummy/config/environment', __FILE__)
4
+
5
+ require 'rspec/rails'
6
+
7
+ require 'stringify_date'
@@ -1,35 +1,36 @@
1
- # coding: utf-8
2
1
  lib = File.expand_path('../lib', __FILE__)
3
2
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
3
  require 'stringify_date/version'
5
4
 
6
5
  Gem::Specification.new do |spec|
7
- spec.name = "stringify_date"
6
+ spec.name = 'stringify_date'
8
7
  spec.version = StringifyDate::VERSION
9
- spec.authors = ["Rute Passos", "Matheus Oliveira"]
10
- spec.email = ["matheus.vetor@gmail.com"]
8
+ spec.authors = ['Matheus Oliveira']
9
+ spec.email = ['matheus.vetor@gmail.com']
11
10
  spec.summary = %q{Parser for string an date/datetime}
12
11
  spec.description = %q{This gem makes it easy to convert string to date and provides method to create a string version for the attribute}
13
- spec.homepage = "https://github.com/matheusvetor/stringify_date"
14
- spec.license = "MIT"
12
+ spec.homepage = 'https://github.com/matheusvetor/stringify_date'
13
+ spec.license = 'MIT'
15
14
 
16
- spec.files.delete("spec/dummy/log")
17
- spec.files.delete("spec/dummy/log/development.log")
18
- spec.files.delete("spec/dummy/log/test.log")
19
- spec.files.delete("spec/dummy/db/development.sqlite3")
20
- spec.files.delete("spec/dummy/db/test.sqlite3")
15
+ spec.files.delete('spec/dummy/log')
16
+ spec.files.delete('spec/dummy/log/development.log')
17
+ spec.files.delete('spec/dummy/log/test.log')
18
+ spec.files.delete('spec/dummy/db/development.sqlite3')
19
+ spec.files.delete('spec/dummy/db/test.sqlite3')
21
20
 
22
21
  spec.files = `git ls-files -z`.split("\x0")
23
22
  spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
24
- spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
25
- spec.require_paths = ["lib"]
23
+ spec.test_files = spec.files.grep(%r{^(spec)/})
24
+ spec.require_paths = ['lib']
26
25
 
27
- spec.add_dependency "activesupport", ">= 3.0"
28
- spec.add_dependency "railties", ">= 3.0"
26
+ spec.add_dependency 'activesupport', '>= 5.0'
27
+ spec.add_dependency 'railties', '>= 5.0'
29
28
 
30
- spec.add_development_dependency "bundler", "~> 1.6"
31
- spec.add_development_dependency "rake"
32
- spec.add_development_dependency "rails"
33
- spec.add_development_dependency "rspec-rails"
34
- spec.add_development_dependency "sqlite3"
29
+ spec.add_development_dependency 'bundler', '>= 2'
30
+ spec.add_development_dependency 'rake', '13.0.1'
31
+ spec.add_development_dependency 'rails'
32
+ spec.add_development_dependency 'rspec-rails', '4.0.1'
33
+ spec.add_development_dependency 'sqlite3'
34
+ spec.add_development_dependency 'tzinfo-data'
35
+ spec.add_development_dependency 'byebug'
35
36
  end
metadata CHANGED
@@ -1,15 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stringify_date
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
- - Rute Passos
8
7
  - Matheus Oliveira
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2014-06-29 00:00:00.000000000 Z
11
+ date: 2020-08-24 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: activesupport
@@ -17,44 +16,58 @@ dependencies:
17
16
  requirements:
18
17
  - - ">="
19
18
  - !ruby/object:Gem::Version
20
- version: '3.0'
19
+ version: '5.0'
21
20
  type: :runtime
22
21
  prerelease: false
23
22
  version_requirements: !ruby/object:Gem::Requirement
24
23
  requirements:
25
24
  - - ">="
26
25
  - !ruby/object:Gem::Version
27
- version: '3.0'
26
+ version: '5.0'
28
27
  - !ruby/object:Gem::Dependency
29
28
  name: railties
30
29
  requirement: !ruby/object:Gem::Requirement
31
30
  requirements:
32
31
  - - ">="
33
32
  - !ruby/object:Gem::Version
34
- version: '3.0'
33
+ version: '5.0'
35
34
  type: :runtime
36
35
  prerelease: false
37
36
  version_requirements: !ruby/object:Gem::Requirement
38
37
  requirements:
39
38
  - - ">="
40
39
  - !ruby/object:Gem::Version
41
- version: '3.0'
40
+ version: '5.0'
42
41
  - !ruby/object:Gem::Dependency
43
42
  name: bundler
44
43
  requirement: !ruby/object:Gem::Requirement
45
44
  requirements:
46
- - - "~>"
45
+ - - ">="
47
46
  - !ruby/object:Gem::Version
48
- version: '1.6'
47
+ version: '2'
49
48
  type: :development
50
49
  prerelease: false
51
50
  version_requirements: !ruby/object:Gem::Requirement
52
51
  requirements:
53
- - - "~>"
52
+ - - ">="
54
53
  - !ruby/object:Gem::Version
55
- version: '1.6'
54
+ version: '2'
56
55
  - !ruby/object:Gem::Dependency
57
56
  name: rake
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - '='
60
+ - !ruby/object:Gem::Version
61
+ version: 13.0.1
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - '='
67
+ - !ruby/object:Gem::Version
68
+ version: 13.0.1
69
+ - !ruby/object:Gem::Dependency
70
+ name: rails
58
71
  requirement: !ruby/object:Gem::Requirement
59
72
  requirements:
60
73
  - - ">="
@@ -68,7 +81,21 @@ dependencies:
68
81
  - !ruby/object:Gem::Version
69
82
  version: '0'
70
83
  - !ruby/object:Gem::Dependency
71
- name: rails
84
+ name: rspec-rails
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - '='
88
+ - !ruby/object:Gem::Version
89
+ version: 4.0.1
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - '='
95
+ - !ruby/object:Gem::Version
96
+ version: 4.0.1
97
+ - !ruby/object:Gem::Dependency
98
+ name: sqlite3
72
99
  requirement: !ruby/object:Gem::Requirement
73
100
  requirements:
74
101
  - - ">="
@@ -82,7 +109,7 @@ dependencies:
82
109
  - !ruby/object:Gem::Version
83
110
  version: '0'
84
111
  - !ruby/object:Gem::Dependency
85
- name: rspec-rails
112
+ name: tzinfo-data
86
113
  requirement: !ruby/object:Gem::Requirement
87
114
  requirements:
88
115
  - - ">="
@@ -96,7 +123,7 @@ dependencies:
96
123
  - !ruby/object:Gem::Version
97
124
  version: '0'
98
125
  - !ruby/object:Gem::Dependency
99
- name: sqlite3
126
+ name: byebug
100
127
  requirement: !ruby/object:Gem::Requirement
101
128
  requirements:
102
129
  - - ">="
@@ -118,26 +145,21 @@ extensions: []
118
145
  extra_rdoc_files: []
119
146
  files:
120
147
  - ".gitignore"
148
+ - ".travis.yml"
149
+ - Dockerfile
121
150
  - Gemfile
122
151
  - LICENSE.txt
123
152
  - README.md
124
153
  - Rakefile
154
+ - docker-compose.yml
125
155
  - lib/stringify_date.rb
126
156
  - lib/stringify_date/active_record/stringify.rb
127
157
  - lib/stringify_date/version.rb
158
+ - spec/active_record/stringify_spec.rb
128
159
  - spec/dummy/README.rdoc
129
160
  - spec/dummy/Rakefile
130
- - spec/dummy/app/assets/images/.keep
131
- - spec/dummy/app/assets/javascripts/application.js
132
- - spec/dummy/app/assets/stylesheets/application.css
133
- - spec/dummy/app/controllers/application_controller.rb
134
- - spec/dummy/app/controllers/concerns/.keep
135
- - spec/dummy/app/helpers/application_helper.rb
136
- - spec/dummy/app/mailers/.keep
137
161
  - spec/dummy/app/models/.keep
138
- - spec/dummy/app/models/concerns/.keep
139
162
  - spec/dummy/app/models/test_date.rb
140
- - spec/dummy/app/views/layouts/application.html.erb
141
163
  - spec/dummy/bin/bundle
142
164
  - spec/dummy/bin/rails
143
165
  - spec/dummy/bin/rake
@@ -149,7 +171,6 @@ files:
149
171
  - spec/dummy/config/environments/development.rb
150
172
  - spec/dummy/config/environments/production.rb
151
173
  - spec/dummy/config/environments/test.rb
152
- - spec/dummy/config/initializers/assets.rb
153
174
  - spec/dummy/config/initializers/backtrace_silencers.rb
154
175
  - spec/dummy/config/initializers/cookies_serializer.rb
155
176
  - spec/dummy/config/initializers/filter_parameter_logging.rb
@@ -162,7 +183,9 @@ files:
162
183
  - spec/dummy/config/secrets.yml
163
184
  - spec/dummy/db/development.sqlite3
164
185
  - spec/dummy/db/migrate/20140629010823_create_test_dates.rb
186
+ - spec/dummy/db/migrate/20140920052550_add_published_at_to_test_dates.rb
165
187
  - spec/dummy/db/schema.rb
188
+ - spec/dummy/db/test.sqlite3
166
189
  - spec/dummy/lib/assets/.keep
167
190
  - spec/dummy/log/.keep
168
191
  - spec/dummy/log/development.log
@@ -170,6 +193,7 @@ files:
170
193
  - spec/dummy/public/422.html
171
194
  - spec/dummy/public/500.html
172
195
  - spec/dummy/public/favicon.ico
196
+ - spec/spec_helper.rb
173
197
  - stringify_date.gemspec
174
198
  homepage: https://github.com/matheusvetor/stringify_date
175
199
  licenses:
@@ -190,25 +214,16 @@ required_rubygems_version: !ruby/object:Gem::Requirement
190
214
  - !ruby/object:Gem::Version
191
215
  version: '0'
192
216
  requirements: []
193
- rubyforge_project:
194
- rubygems_version: 2.2.2
217
+ rubygems_version: 3.0.3
195
218
  signing_key:
196
219
  specification_version: 4
197
220
  summary: Parser for string an date/datetime
198
221
  test_files:
222
+ - spec/active_record/stringify_spec.rb
199
223
  - spec/dummy/README.rdoc
200
224
  - spec/dummy/Rakefile
201
- - spec/dummy/app/assets/images/.keep
202
- - spec/dummy/app/assets/javascripts/application.js
203
- - spec/dummy/app/assets/stylesheets/application.css
204
- - spec/dummy/app/controllers/application_controller.rb
205
- - spec/dummy/app/controllers/concerns/.keep
206
- - spec/dummy/app/helpers/application_helper.rb
207
- - spec/dummy/app/mailers/.keep
208
225
  - spec/dummy/app/models/.keep
209
- - spec/dummy/app/models/concerns/.keep
210
226
  - spec/dummy/app/models/test_date.rb
211
- - spec/dummy/app/views/layouts/application.html.erb
212
227
  - spec/dummy/bin/bundle
213
228
  - spec/dummy/bin/rails
214
229
  - spec/dummy/bin/rake
@@ -220,7 +235,6 @@ test_files:
220
235
  - spec/dummy/config/environments/development.rb
221
236
  - spec/dummy/config/environments/production.rb
222
237
  - spec/dummy/config/environments/test.rb
223
- - spec/dummy/config/initializers/assets.rb
224
238
  - spec/dummy/config/initializers/backtrace_silencers.rb
225
239
  - spec/dummy/config/initializers/cookies_serializer.rb
226
240
  - spec/dummy/config/initializers/filter_parameter_logging.rb
@@ -233,7 +247,9 @@ test_files:
233
247
  - spec/dummy/config/secrets.yml
234
248
  - spec/dummy/db/development.sqlite3
235
249
  - spec/dummy/db/migrate/20140629010823_create_test_dates.rb
250
+ - spec/dummy/db/migrate/20140920052550_add_published_at_to_test_dates.rb
236
251
  - spec/dummy/db/schema.rb
252
+ - spec/dummy/db/test.sqlite3
237
253
  - spec/dummy/lib/assets/.keep
238
254
  - spec/dummy/log/.keep
239
255
  - spec/dummy/log/development.log
@@ -241,3 +257,4 @@ test_files:
241
257
  - spec/dummy/public/422.html
242
258
  - spec/dummy/public/500.html
243
259
  - spec/dummy/public/favicon.ico
260
+ - spec/spec_helper.rb
File without changes
@@ -1,13 +0,0 @@
1
- // This is a manifest file that'll be compiled into application.js, which will include all the files
2
- // listed below.
3
- //
4
- // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
5
- // or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
6
- //
7
- // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
8
- // compiled file.
9
- //
10
- // Read Sprockets README (https://github.com/sstephenson/sprockets#sprockets-directives) for details
11
- // about supported directives.
12
- //
13
- //= require_tree .
@@ -1,15 +0,0 @@
1
- /*
2
- * This is a manifest file that'll be compiled into application.css, which will include all the files
3
- * listed below.
4
- *
5
- * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
6
- * or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
7
- *
8
- * You're free to add application-wide styles to this file and they'll appear at the bottom of the
9
- * compiled file so the styles you add here take precedence over styles defined in any styles
10
- * defined in the other CSS/SCSS files in this directory. It is generally better to create a new
11
- * file per style scope.
12
- *
13
- *= require_tree .
14
- *= require_self
15
- */
@@ -1,5 +0,0 @@
1
- class ApplicationController < ActionController::Base
2
- # Prevent CSRF attacks by raising an exception.
3
- # For APIs, you may want to use :null_session instead.
4
- protect_from_forgery with: :exception
5
- end
File without changes
@@ -1,2 +0,0 @@
1
- module ApplicationHelper
2
- end
File without changes
File without changes
@@ -1,14 +0,0 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <title>Dummy</title>
5
- <%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true %>
6
- <%= javascript_include_tag 'application', 'data-turbolinks-track' => true %>
7
- <%= csrf_meta_tags %>
8
- </head>
9
- <body>
10
-
11
- <%= yield %>
12
-
13
- </body>
14
- </html>
@@ -1,8 +0,0 @@
1
- # Be sure to restart your server when you modify this file.
2
-
3
- # Version of your assets, change this if you want to expire all your assets.
4
- Rails.application.config.assets.version = '1.0'
5
-
6
- # Precompile additional assets.
7
- # application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
8
- # Rails.application.config.assets.precompile += %w( search.js )