xml-mapping_extensions 0.4.8 → 0.4.9

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
2
  SHA1:
3
- metadata.gz: 1132df9b6ea06d26b4c12736637820be891309dd
4
- data.tar.gz: 8b5de3bf4e0e2a0d95a86b808ef4a3a93fde0983
3
+ metadata.gz: 6c1a1ccb9ab7eb0798ea413497f9c02aca2c53ac
4
+ data.tar.gz: 12bf1ef340dbc101bedb893df8283480479e581c
5
5
  SHA512:
6
- metadata.gz: 6be5ac1d8fa92dff1e678760718c337a1b7bd5b0734fe6508fb9b1f5b5ef258b4b6fdc7da63f042d1322a578c2d229a0f0ef21247409501927a57dbd599b72b7
7
- data.tar.gz: 5775bfc7829ec3306b143ac2b4ecbb5e51d205694ce37214d170928c817c3a7026a772ec76a9f1f423d39e7fd7d1318e40c8483f7c5a04c5bff76a2c6e3be4d0
6
+ metadata.gz: 6230ec70000e277931ea3a49122887357bbdd0c9593dc005ec670eef8576b17f68d7988d357811639c2df5d51374798ad0851ba5519d39d2880ede7f660d16ba
7
+ data.tar.gz: 192ea3133ab53b69ac6d43b02eb709e86c5c5ebf0221b05926d7a5fabdc995183cc82ad0dfba347d69c60cc51957d1f79f50773c6970493a2d8a6b129601f13e
data/.gitignore CHANGED
@@ -1,3 +1,8 @@
1
+ # ignore IntelliJ IDEA project entirely
2
+
3
+ .idea
4
+ *.iml
5
+
1
6
  # ignore Gemfile.lock in libraries
2
7
 
3
8
  Gemfile.lock
@@ -104,47 +109,3 @@ flycheck_*.el
104
109
  # directory configuration
105
110
  .dir-locals.el
106
111
 
107
- #####=== JetBrains ===#####
108
- # Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm
109
- # Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
110
-
111
- # User-specific stuff:
112
- .idea/workspace.xml
113
- .idea/tasks.xml
114
-
115
- # Sensitive or high-churn files:
116
- .idea/dataSources/
117
- .idea/dataSources.ids
118
- .idea/dataSources.xml
119
- .idea/dataSources.local.xml
120
- .idea/sqlDataSources.xml
121
- .idea/dynamic.xml
122
- .idea/uiDesigner.xml
123
-
124
- # Gradle:
125
- .idea/gradle.xml
126
- .idea/libraries
127
-
128
- # Mongo Explorer plugin:
129
- .idea/mongoSettings.xml
130
-
131
- ## File-based project format:
132
- *.iws
133
-
134
- ## Plugin-specific files:
135
-
136
- # IntelliJ
137
- /out/
138
-
139
- # mpeltonen/sbt-idea plugin
140
- .idea_modules/
141
-
142
- # JIRA plugin
143
- atlassian-ide-plugin.xml
144
-
145
- # Crashlytics plugin (for Android Studio and IntelliJ)
146
- com_crashlytics_export_strings.xml
147
- crashlytics.properties
148
- crashlytics-build.properties
149
- fabric.properties
150
-
@@ -11,15 +11,15 @@ Style/Documentation:
11
11
  Enabled: false
12
12
 
13
13
  # Allow one line around class body (Style/EmptyLines will still disallow two or more)
14
- Style/EmptyLinesAroundClassBody:
14
+ Layout/EmptyLinesAroundClassBody:
15
15
  Enabled: false
16
16
 
17
17
  # Allow one line around module body (Style/EmptyLines will still disallow two or more)
18
- Style/EmptyLinesAroundModuleBody:
18
+ Layout/EmptyLinesAroundModuleBody:
19
19
  Enabled: false
20
20
 
21
21
  # Allow one line around block body (Style/EmptyLines will still disallow two or more)
22
- Style/EmptyLinesAroundBlockBody:
22
+ Layout/EmptyLinesAroundBlockBody:
23
23
  Enabled: false
24
24
 
25
25
  # Unclear why it's a good idea to give parameters semantically meaningless names
@@ -27,7 +27,7 @@ Style/SingleLineBlockParams:
27
27
  Enabled: false
28
28
 
29
29
  # Produces monsters
30
- Style/MultilineOperationIndentation:
30
+ Layout/MultilineOperationIndentation:
31
31
  Enabled: false
32
32
 
33
33
  # 👎 to cultural imperialism
@@ -1 +1,2 @@
1
- 2.2.5
1
+ 2.4.1
2
+
data/CHANGES.md CHANGED
@@ -1,3 +1,11 @@
1
+ ## 0.4.9 (next)
2
+
3
+ - Update to Ruby 2.4.1
4
+ - Update gems:
5
+ - typesafe_enum → 0.1.8
6
+ - rubocop → 0.52
7
+ - yard → 0.9.12
8
+
1
9
  ## 0.4.8 (19 April 2017)
2
10
 
3
11
  - Update to Ruby 2.2.5
data/example.rb CHANGED
File without changes
@@ -14,9 +14,9 @@ module XML
14
14
 
15
15
  # See `::XML::Mapping::SingleAttributeNode#initialize`
16
16
  def initialize(*args)
17
- path, *args = super(*args)
17
+ path, *myargs = super(*args)
18
18
  @path = ::XML::XXPath.new(path)
19
- args
19
+ myargs # rubocop:disable Lint/Void
20
20
  end
21
21
 
22
22
  # Implements `::XML::Mapping::SingleAttributeNode#extract_attr_value`.
@@ -25,7 +25,7 @@ module XML
25
25
  def extract_attr_value(xml)
26
26
  xml_text = default_when_xpath_err { @path.first(xml).text }
27
27
  to_value(xml_text) if xml_text
28
- rescue => e
28
+ rescue StandardError => e
29
29
  bad_value = xml_text ? "'#{xml_text}'" : 'nil'
30
30
  raise e, "#{@owner}.#{@attrname}: Can't parse #{bad_value} as #{self.class}: #{e.message}"
31
31
  end
@@ -27,7 +27,7 @@ module XML
27
27
  def to_value(xml_text)
28
28
  return nil unless xml_text
29
29
  enum_instance = @enum_class.find_by_value(xml_text)
30
- enum_instance = @enum_class.find_by_value_str(xml_text) unless enum_instance
30
+ enum_instance ||= @enum_class.find_by_value_str(xml_text)
31
31
  raise ArgumentError, "No instance of enum class #{@enum_class.name} found for value '#{xml_text}'" unless enum_instance
32
32
  enum_instance
33
33
  end
@@ -1,6 +1,6 @@
1
1
  module XML
2
2
  module MappingExtensions
3
3
  # The version of this gem
4
- VERSION = '0.4.8'.freeze
4
+ VERSION = '0.4.9'.freeze
5
5
  end
6
6
  end
@@ -65,7 +65,7 @@ module XML
65
65
 
66
66
  it 'truncates a DateTime to a Date' do
67
67
  expected = '2002-09-24'
68
- actual = to_text(DateTime.new(2002, 9, 24, 0, 1, 2))
68
+ actual = to_text(DateTime.new(2002, 9, 24, 0, 1, 2)) # rubocop:disable Style/DateTime
69
69
  expect(actual).to eq(expected)
70
70
  end
71
71
 
@@ -77,7 +77,7 @@ module XML
77
77
 
78
78
  it 'truncates a DateTime to a zulu date' do
79
79
  expected = '2002-09-24Z'
80
- actual = to_zulu_text(DateTime.new(2002, 9, 24, 0, 1, 2))
80
+ actual = to_zulu_text(DateTime.new(2002, 9, 24, 0, 1, 2)) # rubocop:disable Style/DateTime
81
81
  expect(actual).to eq(expected)
82
82
  end
83
83
 
@@ -12,9 +12,9 @@ module XML
12
12
 
13
13
  class ValueNode < SingleAttributeNode
14
14
  def initialize(*args)
15
- path, *args = super(*args)
15
+ path, *myargs = super(*args)
16
16
  @path = ::XML::XXPath.new(path)
17
- args
17
+ myargs # rubocop:disable Lint/Void
18
18
  end
19
19
 
20
20
  def set_attr_value(xml, value)
@@ -1,5 +1,3 @@
1
- # coding: utf-8
2
-
3
1
  lib = File.expand_path('../lib', __FILE__)
4
2
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
5
3
 
@@ -16,7 +14,7 @@ Gem::Specification.new do |spec|
16
14
  spec.license = 'MIT'
17
15
 
18
16
  origin = `git config --get remote.origin.url`.chomp
19
- origin_uri = origin.start_with?('http') ? URI(origin) : URI(origin.sub('git@github.com:', 'https://github.com/'))
17
+ origin_uri = origin.start_with?('http') ? URI(origin) : URI(origin.gsub(%r{git@([^:]+)(.com|.org)[^\/]+}, 'http://\1\2'))
20
18
  spec.homepage = URI::HTTP.build(host: origin_uri.host, path: origin_uri.path.chomp('.git')).to_s
21
19
 
22
20
  spec.files = `git ls-files -z`.split("\x0")
@@ -25,15 +23,15 @@ Gem::Specification.new do |spec|
25
23
  spec.require_paths = ['lib']
26
24
 
27
25
  spec.add_dependency 'mime-types', '~> 3.0'
28
- spec.add_dependency 'typesafe_enum', '~> 0.1', '>= 0.1.5'
26
+ spec.add_dependency 'typesafe_enum', '~> 0.1', '>= 0.1.8'
29
27
  spec.add_dependency 'xml-mapping', '~> 0.10'
30
28
 
31
29
  spec.add_development_dependency 'activesupport', '~> 4.2' # for testing
32
30
  spec.add_development_dependency 'equivalent-xml', '~> 0.6.0'
33
31
  spec.add_development_dependency 'rake', '>= 10.4'
34
32
  spec.add_development_dependency 'rspec', '~> 3.2'
35
- spec.add_development_dependency 'rubocop', '~> 0.47'
33
+ spec.add_development_dependency 'rubocop', '~> 0.52'
36
34
  spec.add_development_dependency 'simplecov', '~> 0.9.2'
37
35
  spec.add_development_dependency 'simplecov-console', '~> 0.2.0'
38
- spec.add_development_dependency 'yard', '~> 0.8'
36
+ spec.add_development_dependency 'yard', '~> 0.9', '>= 0.9.12'
39
37
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: xml-mapping_extensions
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.8
4
+ version: 0.4.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Moles
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-04-19 00:00:00.000000000 Z
11
+ date: 2018-01-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mime-types
@@ -33,7 +33,7 @@ dependencies:
33
33
  version: '0.1'
34
34
  - - ">="
35
35
  - !ruby/object:Gem::Version
36
- version: 0.1.5
36
+ version: 0.1.8
37
37
  type: :runtime
38
38
  prerelease: false
39
39
  version_requirements: !ruby/object:Gem::Requirement
@@ -43,7 +43,7 @@ dependencies:
43
43
  version: '0.1'
44
44
  - - ">="
45
45
  - !ruby/object:Gem::Version
46
- version: 0.1.5
46
+ version: 0.1.8
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: xml-mapping
49
49
  requirement: !ruby/object:Gem::Requirement
@@ -120,14 +120,14 @@ dependencies:
120
120
  requirements:
121
121
  - - "~>"
122
122
  - !ruby/object:Gem::Version
123
- version: '0.47'
123
+ version: '0.52'
124
124
  type: :development
125
125
  prerelease: false
126
126
  version_requirements: !ruby/object:Gem::Requirement
127
127
  requirements:
128
128
  - - "~>"
129
129
  - !ruby/object:Gem::Version
130
- version: '0.47'
130
+ version: '0.52'
131
131
  - !ruby/object:Gem::Dependency
132
132
  name: simplecov
133
133
  requirement: !ruby/object:Gem::Requirement
@@ -162,14 +162,20 @@ dependencies:
162
162
  requirements:
163
163
  - - "~>"
164
164
  - !ruby/object:Gem::Version
165
- version: '0.8'
165
+ version: '0.9'
166
+ - - ">="
167
+ - !ruby/object:Gem::Version
168
+ version: 0.9.12
166
169
  type: :development
167
170
  prerelease: false
168
171
  version_requirements: !ruby/object:Gem::Requirement
169
172
  requirements:
170
173
  - - "~>"
171
174
  - !ruby/object:Gem::Version
172
- version: '0.8'
175
+ version: '0.9'
176
+ - - ">="
177
+ - !ruby/object:Gem::Version
178
+ version: 0.9.12
173
179
  description: Mapping nodes and other utility classes extending XML::Mapping
174
180
  email:
175
181
  - david.moles@ucop.edu
@@ -178,13 +184,6 @@ extensions: []
178
184
  extra_rdoc_files: []
179
185
  files:
180
186
  - ".gitignore"
181
- - ".idea/emacs.xml"
182
- - ".idea/encodings.xml"
183
- - ".idea/inspectionProfiles/Project_Default.xml"
184
- - ".idea/misc.xml"
185
- - ".idea/modules.xml"
186
- - ".idea/sbt.xml"
187
- - ".idea/vcs.xml"
188
187
  - ".rubocop.yml"
189
188
  - ".ruby-version"
190
189
  - ".yardopts"
@@ -220,8 +219,7 @@ files:
220
219
  - spec/unit/xml/mapping_extensions/typesafe_enum_node_spec.rb
221
220
  - spec/unit/xml/mapping_extensions/uri_node_spec.rb
222
221
  - xml-mapping_extensions.gemspec
223
- - xml-mapping_extensions.iml
224
- homepage: http://github.com/dmolesUC3/xml-mapping_extensions
222
+ homepage: http://github.com/xml-mapping_extensions
225
223
  licenses:
226
224
  - MIT
227
225
  metadata: {}
@@ -241,7 +239,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
241
239
  version: '0'
242
240
  requirements: []
243
241
  rubyforge_project:
244
- rubygems_version: 2.6.8
242
+ rubygems_version: 2.6.12
245
243
  signing_key:
246
244
  specification_version: 4
247
245
  summary: Some extensions for for XML::Mapping
@@ -1,6 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="EmacsSettings">
4
- <option name="emacsPath" value="/usr/bin/emacs" />
5
- </component>
6
- </project>
@@ -1,6 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="Encoding">
4
- <file url="PROJECT" charset="UTF-8" />
5
- </component>
6
- </project>
@@ -1,11 +0,0 @@
1
- <component name="InspectionProjectProfileManager">
2
- <profile version="1.0">
3
- <option name="myName" value="Project Default" />
4
- <inspection_tool class="Rubocop" enabled="false" level="WARNING" enabled_by_default="false" />
5
- <inspection_tool class="SpellCheckingInspection" enabled="false" level="TYPO" enabled_by_default="false">
6
- <option name="processCode" value="true" />
7
- <option name="processLiterals" value="true" />
8
- <option name="processComments" value="true" />
9
- </inspection_tool>
10
- </profile>
11
- </component>
@@ -1,6 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="ProjectRootManager" version="2" languageLevel="JDK_1_6" default="false" project-jdk-name="RVM: ruby-2.2.5 [global]" project-jdk-type="RUBY_SDK">
4
- <output url="file://$PROJECT_DIR$/out" />
5
- </component>
6
- </project>
@@ -1,8 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="ProjectModuleManager">
4
- <modules>
5
- <module fileurl="file://$PROJECT_DIR$/xml-mapping_extensions.iml" filepath="$PROJECT_DIR$/xml-mapping_extensions.iml" />
6
- </modules>
7
- </component>
8
- </project>
@@ -1,6 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="ScalaSbtSettings">
4
- <option name="vmParameters" value="" />
5
- </component>
6
- </project>
@@ -1,6 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="VcsDirectoryMappings">
4
- <mapping directory="" vcs="Git" />
5
- </component>
6
- </project>
@@ -1,44 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <module type="RUBY_MODULE" version="4">
3
- <component name="NewModuleRootManager" inherit-compiler-output="true">
4
- <exclude-output />
5
- <content url="file://$MODULE_DIR$" />
6
- <orderEntry type="jdk" jdkName="ruby-2.2.5-p319" jdkType="RUBY_SDK" />
7
- <orderEntry type="sourceFolder" forTests="false" />
8
- <orderEntry type="library" scope="PROVIDED" name="activesupport (v4.2.8, ruby-2.2.5-p319) [gem]" level="application" />
9
- <orderEntry type="library" scope="PROVIDED" name="ast (v2.3.0, ruby-2.2.5-p319) [gem]" level="application" />
10
- <orderEntry type="library" scope="PROVIDED" name="bundler (v1.14.6, ruby-2.2.5-p319) [gem]" level="application" />
11
- <orderEntry type="library" scope="PROVIDED" name="colorize (v0.8.1, ruby-2.2.5-p319) [gem]" level="application" />
12
- <orderEntry type="library" scope="PROVIDED" name="diff-lcs (v1.3, ruby-2.2.5-p319) [gem]" level="application" />
13
- <orderEntry type="library" scope="PROVIDED" name="docile (v1.1.5, ruby-2.2.5-p319) [gem]" level="application" />
14
- <orderEntry type="library" scope="PROVIDED" name="equivalent-xml (v0.6.0, ruby-2.2.5-p319) [gem]" level="application" />
15
- <orderEntry type="library" scope="PROVIDED" name="hirb (v0.7.3, ruby-2.2.5-p319) [gem]" level="application" />
16
- <orderEntry type="library" scope="PROVIDED" name="i18n (v0.8.1, ruby-2.2.5-p319) [gem]" level="application" />
17
- <orderEntry type="library" scope="PROVIDED" name="mime-types (v3.1, ruby-2.2.5-p319) [gem]" level="application" />
18
- <orderEntry type="library" scope="PROVIDED" name="mime-types-data (v3.2016.0521, ruby-2.2.5-p319) [gem]" level="application" />
19
- <orderEntry type="library" scope="PROVIDED" name="mini_portile2 (v2.1.0, ruby-2.2.5-p319) [gem]" level="application" />
20
- <orderEntry type="library" scope="PROVIDED" name="minitest (v5.10.1, ruby-2.2.5-p319) [gem]" level="application" />
21
- <orderEntry type="library" scope="PROVIDED" name="multi_json (v1.12.1, ruby-2.2.5-p319) [gem]" level="application" />
22
- <orderEntry type="library" scope="PROVIDED" name="nokogiri (v1.7.1, ruby-2.2.5-p319) [gem]" level="application" />
23
- <orderEntry type="library" scope="PROVIDED" name="parser (v2.4.0.0, ruby-2.2.5-p319) [gem]" level="application" />
24
- <orderEntry type="library" scope="PROVIDED" name="powerpack (v0.1.1, ruby-2.2.5-p319) [gem]" level="application" />
25
- <orderEntry type="library" scope="PROVIDED" name="rainbow (v2.2.1, ruby-2.2.5-p319) [gem]" level="application" />
26
- <orderEntry type="library" scope="PROVIDED" name="rake (v12.0.0, ruby-2.2.5-p319) [gem]" level="application" />
27
- <orderEntry type="library" scope="PROVIDED" name="rspec (v3.5.0, ruby-2.2.5-p319) [gem]" level="application" />
28
- <orderEntry type="library" scope="PROVIDED" name="rspec-core (v3.5.4, ruby-2.2.5-p319) [gem]" level="application" />
29
- <orderEntry type="library" scope="PROVIDED" name="rspec-expectations (v3.5.0, ruby-2.2.5-p319) [gem]" level="application" />
30
- <orderEntry type="library" scope="PROVIDED" name="rspec-mocks (v3.5.0, ruby-2.2.5-p319) [gem]" level="application" />
31
- <orderEntry type="library" scope="PROVIDED" name="rspec-support (v3.5.0, ruby-2.2.5-p319) [gem]" level="application" />
32
- <orderEntry type="library" scope="PROVIDED" name="rubocop (v0.48.1, ruby-2.2.5-p319) [gem]" level="application" />
33
- <orderEntry type="library" scope="PROVIDED" name="ruby-progressbar (v1.8.1, ruby-2.2.5-p319) [gem]" level="application" />
34
- <orderEntry type="library" scope="PROVIDED" name="simplecov (v0.9.2, ruby-2.2.5-p319) [gem]" level="application" />
35
- <orderEntry type="library" scope="PROVIDED" name="simplecov-console (v0.2.0, ruby-2.2.5-p319) [gem]" level="application" />
36
- <orderEntry type="library" scope="PROVIDED" name="simplecov-html (v0.9.0, ruby-2.2.5-p319) [gem]" level="application" />
37
- <orderEntry type="library" scope="PROVIDED" name="thread_safe (v0.3.6, ruby-2.2.5-p319) [gem]" level="application" />
38
- <orderEntry type="library" scope="PROVIDED" name="typesafe_enum (v0.1.7, ruby-2.2.5-p319) [gem]" level="application" />
39
- <orderEntry type="library" scope="PROVIDED" name="tzinfo (v1.2.3, ruby-2.2.5-p319) [gem]" level="application" />
40
- <orderEntry type="library" scope="PROVIDED" name="unicode-display_width (v1.2.1, ruby-2.2.5-p319) [gem]" level="application" />
41
- <orderEntry type="library" scope="PROVIDED" name="xml-mapping (v0.10.0, ruby-2.2.5-p319) [gem]" level="application" />
42
- <orderEntry type="library" scope="PROVIDED" name="yard (v0.9.8, ruby-2.2.5-p319) [gem]" level="application" />
43
- </component>
44
- </module>