ead 0.4.5 → 0.4.6

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.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/lib/ead.rb +8 -8
  3. data/lib/table.rb +5 -5
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 450bcaedd5e7c5a27baac86e7bd92f2ad9d9b8b7b2d7b7b2b7acccf25eb53d67
4
- data.tar.gz: 7024d256fa407c6f5301bc9566a9a932eadebabd12c0e1eb16d87d1f322366aa
3
+ metadata.gz: 92794b354827c99861ef67bada7a6b903982f728f83ef61825e84aa774f3b7a5
4
+ data.tar.gz: f1ee6af6f98952cc264ced02309681e15085ea04bc13e27d0de3a213aa6531f9
5
5
  SHA512:
6
- metadata.gz: 238c5a8c1c5c4d5252b4d5d2736c5f035ec6fe317a2f44d118bbb275c6e6c7903f4f45a2522ead87d25ace953ed26100ad55873047807609f0e2d538408183e8
7
- data.tar.gz: 34f6a6ffeaa60fe7e7f500941006efb5a4e5e37cbec2f0b25b79a39952e4b1097c9bb33fe21e21145d58931d5c7c56b240ee93e0399965c3f296ffc05e90b769
6
+ metadata.gz: 5c6ff6ee9db8731482c286bdf0c00a64e39cfcb8a628a3a78f56fb4187fed8551288c907d0539af2c6a87f6534be044bc283f7e0dc7e6e28b70669d21e5badfb
7
+ data.tar.gz: e9deeae107a89272452f2a3863b1deb99dfe2658f64ce6e364656d6067d11f8b4a034d250cc6b2e80a7fbf41eaf59aa3223e8c90c5d893e8206fbec61446a748
data/lib/ead.rb CHANGED
@@ -7,11 +7,11 @@ class EAD
7
7
  def import_JSON(user_arguments)
8
8
  file = File.read(user_arguments[0] || './EAD.json')
9
9
 
10
- unless ['0.4.0', '0.4.1', '0.4.2', '0.4.3', '0.4.4', '0.4.5'].include? JSON.parse(file)['version']
10
+ unless ['0.4.0', '0.4.1', '0.4.2', '0.4.3', '0.4.4', '0.4.5', '0.4.6'].include? JSON.parse(file)['version']
11
11
  puts "\n\n----------------"
12
12
  puts "\e[31m#{
13
- 'Versions of your EAD file and the gem are not compatible.'\
14
- ' So, you may have some unexpected results.'\
13
+ 'Versions of your EAD file and the gem are not compatible. '\
14
+ 'So, you may have some unexpected results.'\
15
15
  'To run your EAD file correctly, please run'
16
16
  }\e[0m"
17
17
 
@@ -63,11 +63,11 @@ class EAD
63
63
  def check_latest_version
64
64
  response = JSON.parse RestClient.get 'https://api.github.com/repos/ozovalihasan/ead/tags'
65
65
 
66
- unless response.first['name'] == 'v0.4.5'
66
+ unless response.first['name'] == 'v0.4.6'
67
67
  puts "\n\n----------------"
68
68
  puts "\n\e[33m#{
69
- 'A new version of this gem has been released.'\
70
- ' Please check it. https://github.com/ozovalihasan/ead-g/releases'
69
+ 'A new version of this gem has been released. '\
70
+ 'Please check it. https://github.com/ozovalihasan/ead-g/releases'
71
71
  }\e[0m"
72
72
 
73
73
  puts "\n----------------\n\n"
@@ -75,8 +75,8 @@ class EAD
75
75
  rescue StandardError
76
76
  puts "\n\n----------------"
77
77
  puts "\n\e[31m#{
78
- 'If you want to check the latest version of this gem,'\
79
- ' you need to have a stable internet connection.'
78
+ 'If you want to check the latest version of this gem, '\
79
+ 'you need to have a stable internet connection.'
80
80
  }\e[0m"
81
81
 
82
82
  puts "\n----------------\n\n"
data/lib/table.rb CHANGED
@@ -59,10 +59,10 @@ class Table < TableEntityBase
59
59
  end
60
60
 
61
61
  def add_polymorphic_reference_migration_for_sti
62
- if superclass && polymorphic
63
- polymorphic_names.each do |name|
64
- generate_reference_migration(name, true)
65
- end
62
+ return unless superclass && polymorphic
63
+
64
+ polymorphic_names.each do |name|
65
+ generate_reference_migration(name, true)
66
66
  end
67
67
  end
68
68
 
@@ -71,7 +71,7 @@ class Table < TableEntityBase
71
71
  end
72
72
 
73
73
  def update_polymorphic_names
74
- return if entities.size.zero?
74
+ return if entities.empty?
75
75
 
76
76
  belong_parents = []
77
77
  entities.each do |entity|
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ead
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.5
4
+ version: 0.4.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hasan Ozovali
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-10-27 00:00:00.000000000 Z
11
+ date: 2023-04-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rest-client