plist4r 1.1.0 → 1.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.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.1.0
1
+ 1.1.1
@@ -134,7 +134,7 @@ module Plist4r
134
134
  # plist.validate_value :string, "CFBundleIdentifier", ["com.apple.myapp"]
135
135
  # # => Raises Class mismatch. Value is of type Array, should be String
136
136
  def validate_value key_type, key, value
137
- unless ClassesForKeyType[key_type].include? value.class
137
+ unless ClassesForKeyType[key_type].include?(value.class)
138
138
  raise "Key: #{key}, value: #{value.inspect} is of type #{value.class}. Should be: #{ClassesForKeyType[key_type].join ", "}"
139
139
  end
140
140
  case key_type
@@ -219,7 +219,7 @@ module Plist4r
219
219
  when nil
220
220
  @orig[key]
221
221
  else
222
- validate_value key_type, key, value unless key_type == nil
222
+ validate_value key_type, key, value if ClassesForKeyType.keys.include?(key_type)
223
223
  @hash[key] = value
224
224
  end
225
225
  end
@@ -3,22 +3,22 @@ require 'optparse'
3
3
 
4
4
  module Plist4r
5
5
  module Mixlib
6
- #
7
- # Author:: Adam Jacob (<adam@opscode.com>)
8
- # Copyright:: Copyright (c) 2008 Opscode, Inc.
9
- # License:: Apache License, Version 2.0
10
- #
11
- # Licensed under the Apache License, Version 2.0 (the "License");
12
- # you may not use this file except in compliance with the License.
13
- # You may obtain a copy of the License at
14
- #
15
- # http://www.apache.org/licenses/LICENSE-2.0
16
- #
17
- # Unless required by applicable law or agreed to in writing, software
18
- # distributed under the License is distributed on an "AS IS" BASIS,
19
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
20
- # See the License for the specific language governing permissions and
21
- # limitations under the License.
6
+ # <tt></tt>
7
+ # Author:: Adam Jacob (<adam@opscode.com>)
8
+ # Copyright:: Copyright (c) 2008 Opscode, Inc.
9
+ # License:: Apache License, Version 2.0
10
+ #
11
+ # Licensed under the Apache License, Version 2.0 (the "License");
12
+ # you may not use this file except in compliance with the License.
13
+ # You may obtain a copy of the License at
14
+ #
15
+ # http://www.apache.org/licenses/LICENSE-2.0
16
+ #
17
+ # Unless required by applicable law or agreed to in writing, software
18
+ # distributed under the License is distributed on an "AS IS" BASIS,
19
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
20
+ # See the License for the specific language governing permissions and
21
+ # limitations under the License.
22
22
  #
23
23
  module CLI
24
24
  module ClassMethods
@@ -12,24 +12,24 @@ end
12
12
 
13
13
  module Plist4r
14
14
  module Mixlib
15
- #
16
- # Author:: Adam Jacob (<adam@opscode.com>)
17
- # Author:: Nuo Yan (<nuo@opscode.com>)
18
- # Author:: Christopher Brown (<cb@opscode.com>)
19
- # Copyright:: Copyright (c) 2008 Opscode, Inc.
20
- # License:: Apache License, Version 2.0
21
- #
22
- # Licensed under the Apache License, Version 2.0 (the "License");
23
- # you may not use this file except in compliance with the License.
24
- # You may obtain a copy of the License at
25
- #
26
- # http://www.apache.org/licenses/LICENSE-2.0
27
- #
28
- # Unless required by applicable law or agreed to in writing, software
29
- # distributed under the License is distributed on an "AS IS" BASIS,
30
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
31
- # See the License for the specific language governing permissions and
32
- # limitations under the License.
15
+ # <tt></tt>
16
+ # Author:: Adam Jacob (<adam@opscode.com>)
17
+ # Author:: Nuo Yan (<nuo@opscode.com>)
18
+ # Author:: Christopher Brown (<cb@opscode.com>)
19
+ # Copyright:: Copyright (c) 2008 Opscode, Inc.
20
+ # License:: Apache License, Version 2.0
21
+ #
22
+ # Licensed under the Apache License, Version 2.0 (the "License");
23
+ # you may not use this file except in compliance with the License.
24
+ # You may obtain a copy of the License at
25
+ #
26
+ # http://www.apache.org/licenses/LICENSE-2.0
27
+ #
28
+ # Unless required by applicable law or agreed to in writing, software
29
+ # distributed under the License is distributed on an "AS IS" BASIS,
30
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
31
+ # See the License for the specific language governing permissions and
32
+ # limitations under the License.
33
33
  #
34
34
  module Config
35
35
 
@@ -1,34 +1,32 @@
1
1
 
2
2
  module Plist4r
3
3
  module ActiveSupport
4
- # ActiveSupport::OrderedHash
5
- #
6
- # Copyright (c) 2005 David Hansson,
7
- #
8
- # Copyright (c) 2007 Mauricio Fernandez, Sam Stephenson
9
- #
10
- # Copyright (c) 2008 Steve Purcell, Josh Peek
11
- #
12
- # Copyright (c) 2009 Christoffer Sawicki
13
- #
14
- # Permission is hereby granted, free of charge, to any person obtaining
15
- # a copy of this software and associated documentation files (the
16
- # "Software"), to deal in the Software without restriction, including
17
- # without limitation the rights to use, copy, modify, merge, publish,
18
- # distribute, sublicense, and/or sell copies of the Software, and to
19
- # permit persons to whom the Software is furnished to do so, subject to
20
- # the following conditions:
21
- #
22
- # The above copyright notice and this permission notice shall be
23
- # included in all copies or substantial portions of the Software.
24
- #
25
- # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
26
- # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
27
- # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
28
- # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
29
- # LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
30
- # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
31
- # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
4
+ # <tt></tt>
5
+ # ActiveSupport::OrderedHash
6
+ #
7
+ # Copyright (c) 2005 David Hansson,
8
+ # Copyright (c) 2007 Mauricio Fernandez, Sam Stephenson
9
+ # Copyright (c) 2008 Steve Purcell, Josh Peek
10
+ # Copyright (c) 2009 Christoffer Sawicki
11
+ #
12
+ # Permission is hereby granted, free of charge, to any person obtaining
13
+ # a copy of this software and associated documentation files (the
14
+ # "Software"), to deal in the Software without restriction, including
15
+ # without limitation the rights to use, copy, modify, merge, publish,
16
+ # distribute, sublicense, and/or sell copies of the Software, and to
17
+ # permit persons to whom the Software is furnished to do so, subject to
18
+ # the following conditions:
19
+ #
20
+ # The above copyright notice and this permission notice shall be
21
+ # included in all copies or substantial portions of the Software.
22
+ #
23
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
24
+ # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
25
+ # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
26
+ # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
27
+ # LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
28
+ # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
29
+ # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
32
30
  #
33
31
  class OrderedHash < Hash
34
32
  def initialize(*args, &block)
@@ -23,7 +23,7 @@ module Plist4r
23
23
  :array_of_strings => %w[ LimitLoadToHosts LimitLoadFromHosts ProgramArguments WatchPaths QueueDirectories ],
24
24
 
25
25
  :method_defined => %w[ inetdCompatibility KeepAlive EnvironmentVariables StartCalendarInterval
26
- SoftResourceLimits, HardResourceLimits MachServices Sockets ]
26
+ SoftResourceLimits, HardResourceLimits MachServices Socket ]
27
27
  }
28
28
 
29
29
  # Set or return the plist key +inetdCompatibility+
data/plist4r.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{plist4r}
8
- s.version = "1.1.0"
8
+ s.version = "1.1.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["dreamcat4"]
12
- s.date = %q{2010-07-21}
12
+ s.date = %q{2010-08-02}
13
13
  s.default_executable = %q{plist4r}
14
14
  s.description = %q{Plist4r is for editing Plist files in an easy-to-use, fast, and reliabile way. A comprehensive and fully featured Ruby library. Xml and Binary file formats are supported, with backends for Linux and Mac.}
15
15
  s.email = %q{dreamcat4@gmail.com}
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 1
7
7
  - 1
8
- - 0
9
- version: 1.1.0
8
+ - 1
9
+ version: 1.1.1
10
10
  platform: ruby
11
11
  authors:
12
12
  - dreamcat4
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-07-21 00:00:00 +01:00
17
+ date: 2010-08-02 00:00:00 +01:00
18
18
  default_executable: plist4r
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency