enju_event 0.4.0.beta.1 → 0.4.0.beta.2

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: 63a31bb020f3875c6255cb7a9df0a42a725699153d9bae594d91d67de835bc31
4
- data.tar.gz: 7efbfc7e8433e334c28b188b274bdc8ad1e78a4cf91f6124a43ee61e0ff7ae08
3
+ metadata.gz: 7dab754e58bfe446f10747db5d3e6dc553858be52cdf109123c863cb08b0887f
4
+ data.tar.gz: 1b2e9c0802e5029a7fe253938f3f5dd5e3e5cef55a9794debbce59e4725af077
5
5
  SHA512:
6
- metadata.gz: d271fbf21f3e5a5d95a61a58c839aefb0066eac738cc9654f8bfec4bcb0e5ee093af6d53f99e51a667256563ca5b22b78e9e4b2ac896830b5560a598a1d298b4
7
- data.tar.gz: '058e66132258e9348ae9312059b4bafc36d875c5c6561105e8547756b8bdd1ced620ed018a30f4659b8e690795cfaba6adb9114b4055b7b4038edbf9e01d197f'
6
+ metadata.gz: 7a6fd6c0aceaa9531a978f20d1803eedede8c5a5fbf9e3498e8adeb53a5fd701c9cede6a273642043ac7df0269b1b48c6ebd5ceeb0d41b53d8ccebc329304d69
7
+ data.tar.gz: 745c0d398255348680cd2a6c130daa97dca46507c873ef41c433d58165eb6ec8ae040a215e8804a153b2cbc5b692db3f223a1032b2cbc472cfe25ffb3296a59d
data/README.md CHANGED
@@ -1,7 +1,6 @@
1
1
  # EnjuEvent
2
- [![CircleCI](https://circleci.com/gh/next-l/enju_event.svg?style=svg)](https://circleci.com/gh/next-l/enju_event)
2
+ ![](https://github.com/next-l/enju_event/workflows/Ruby/badge.svg?branch=2.x)
3
3
  [![Coverage Status](https://coveralls.io/repos/github/next-l/enju_event/badge.svg?branch=master)](https://coveralls.io/github/next-l/enju_event?branch=master)
4
- [![security](https://hakiri.io/github/next-l/enju_event/master.svg)](https://hakiri.io/github/next-l/enju_event/master)
5
4
 
6
5
  This project rocks and uses MIT-LICENSE.
7
6
 
@@ -1,5 +1,8 @@
1
1
  class EventExportFile < ApplicationRecord
2
- include Statesman::Adapters::ActiveRecordQueries
2
+ include Statesman::Adapters::ActiveRecordQueries[
3
+ transition_class: EventExportFileTransition,
4
+ initial_state: :pending
5
+ ]
3
6
  include ExportFile
4
7
 
5
8
  if ENV['ENJU_STORAGE'] == 's3'
@@ -3,7 +3,6 @@ class EventExportFileTransition < ApplicationRecord
3
3
 
4
4
 
5
5
  belongs_to :event_export_file, inverse_of: :event_export_file_transitions
6
- # attr_accessible :to_state, :sort_key, :metadata
7
6
  end
8
7
 
9
8
  # == Schema Information
@@ -1,5 +1,8 @@
1
1
  class EventImportFile < ApplicationRecord
2
- include Statesman::Adapters::ActiveRecordQueries
2
+ include Statesman::Adapters::ActiveRecordQueries[
3
+ transition_class: EventImportFileTransition,
4
+ initial_state: :pending
5
+ ]
3
6
  include ImportFile
4
7
  scope :not_imported, -> {in_state(:pending)}
5
8
  scope :stucked, -> {in_state(:pending).where('event_import_files.created_at < ?', 1.hour.ago)}
@@ -3,19 +3,18 @@ class EventImportFileTransition < ApplicationRecord
3
3
 
4
4
 
5
5
  belongs_to :event_import_file, inverse_of: :event_import_file_transitions
6
- # attr_accessible :to_state, :sort_key, :metadata
7
6
  end
8
7
 
9
8
  # == Schema Information
10
9
  #
11
10
  # Table name: event_import_file_transitions
12
11
  #
13
- # id :integer not null, primary key
12
+ # id :bigint not null, primary key
14
13
  # to_state :string
15
- # metadata :text default({})
14
+ # metadata :jsonb
16
15
  # sort_key :integer
17
16
  # event_import_file_id :integer
18
- # created_at :datetime
19
- # updated_at :datetime
17
+ # created_at :datetime not null
18
+ # updated_at :datetime not null
20
19
  # most_recent :boolean not null
21
20
  #
@@ -2,11 +2,7 @@ class CreateEventImportFileTransitions < ActiveRecord::Migration[4.2]
2
2
  def change
3
3
  create_table :event_import_file_transitions do |t|
4
4
  t.string :to_state
5
- if ActiveRecord::Base.configurations[Rails.env]["adapter"].try(:match, /mysql/)
6
- t.text :metadata
7
- else
8
- t.text :metadata, default: "{}"
9
- end
5
+ t.text :metadata, default: "{}"
10
6
  t.integer :sort_key
11
7
  t.integer :event_import_file_id
12
8
  t.timestamps
@@ -1,3 +1,3 @@
1
1
  module EnjuEvent
2
- VERSION = "0.4.0.beta.1"
2
+ VERSION = "0.4.0.beta.2"
3
3
  end
@@ -12,9 +12,25 @@ namespace :enju_event do
12
12
  EventImportFile.import
13
13
  end
14
14
 
15
- desc "upgrade enju_circulation"
16
- task upgrade: :environment do
15
+ desc "upgrade enju_event to 1.3"
16
+ task upgrade_to_13: :environment do
17
17
  Rake::Task['statesman:backfill_most_recent'].invoke('EventExportFile')
18
18
  Rake::Task['statesman:backfill_most_recent'].invoke('EventImportFile')
19
19
  end
20
+
21
+ desc "upgrade enju_event to 2.0"
22
+ task upgrade: :environment do
23
+ class_names = [
24
+ Event, EventCategory
25
+ ]
26
+ class_names.each do |klass|
27
+ klass.find_each do |record|
28
+ I18n.available_locales.each do |locale|
29
+ next unless record.respond_to?("display_name_#{locale}")
30
+ record.update("display_name_#{locale}": YAML.safe_load(record[:display_name])[locale.to_s])
31
+ end
32
+ end
33
+ end
34
+ puts 'enju_event: The upgrade completed successfully.'
35
+ end
20
36
  end
@@ -0,0 +1,3 @@
1
+ //= link_tree ../images
2
+ //= link_directory ../javascripts .js
3
+ //= link_directory ../stylesheets .css
@@ -13,7 +13,6 @@
13
13
  ActiveRecord::Schema.define(version: 2019_07_13_115451) do
14
14
 
15
15
  # These are extensions that must be enabled in order to support this database
16
- enable_extension "pgcrypto"
17
16
  enable_extension "plpgsql"
18
17
 
19
18
  create_table "accepts", id: :serial, force: :cascade do |t|
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: enju_event
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0.beta.1
4
+ version: 0.4.0.beta.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kosuke Tanabe
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-08-15 00:00:00.000000000 Z
11
+ date: 2019-11-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: enju_message
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 0.4.0.beta.1
19
+ version: 0.4.0.beta.2
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 0.4.0.beta.1
26
+ version: 0.4.0.beta.2
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: ri_cal
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -44,14 +44,14 @@ dependencies:
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: 1.4.0.beta.1
47
+ version: 2.0.0.beta.1
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: 1.4.0.beta.1
54
+ version: 2.0.0.beta.1
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: pg
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -362,6 +362,7 @@ files:
362
362
  - spec/controllers/libraries_controller_spec.rb
363
363
  - spec/controllers/participates_controller_spec.rb
364
364
  - spec/dummy/Rakefile
365
+ - spec/dummy/app/assets/config/manifest.js
365
366
  - spec/dummy/app/assets/javascripts/application.js
366
367
  - spec/dummy/app/assets/stylesheets/application.css
367
368
  - spec/dummy/app/controllers/application_controller.rb
@@ -660,6 +661,7 @@ test_files:
660
661
  - spec/dummy/app/jobs/application_job.rb
661
662
  - spec/dummy/app/controllers/application_controller.rb
662
663
  - spec/dummy/app/views/layouts/application.html.erb
664
+ - spec/dummy/app/assets/config/manifest.js
663
665
  - spec/dummy/app/assets/javascripts/application.js
664
666
  - spec/dummy/app/assets/stylesheets/application.css
665
667
  - spec/dummy/app/helpers/application_helper.rb