editorconfig 0.2.0 → 0.2.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
2
  SHA1:
3
- metadata.gz: 64a6b74e60347b7f0f46844b74d685a4cd137dab
4
- data.tar.gz: 5f46d8b91c90c9b6c5a6fe92cf46445f88cd20ab
3
+ metadata.gz: 1e1a47db3cdf95e4fc2b97f54136d5446fbeea6c
4
+ data.tar.gz: b8f33f8d96bc75b140091cf1b5fb3f9552edc687
5
5
  SHA512:
6
- metadata.gz: cc966a7f53f0e581f1ebc4eaadcf8e391681d592ee323b42628cf17995a11e833aee2d53773411941c543eef931d4ab53c17a3e0f47be0435ab46178de00e2cf
7
- data.tar.gz: 7f0db69b7e53300db3d2fc095ec7cb6fa6cb5eb9d8d4288b18d0cc2e3b2ba5d18ca817a4d4b596e8792a865d4944c0619aff42c6103e41d3f79272b75548bcca
6
+ metadata.gz: 2fb9729bf61e957da4e27d7c309e720fea5dd97f549afaee4a519d122a96571d1d71ac65acf2a2f717721ead9759a01c891f12a62f12c25e0916bb3124c843f7
7
+ data.tar.gz: 425ec22a09d801773e0b13bbf7413dfed3cd9a20176b3a2716610da493f41a0ac1b8d6ad6da1972f3fc00eb4110499acef99c87b5ff58d2f1b268e075ad70763
@@ -48,18 +48,6 @@ module EditorConfig
48
48
  # components.
49
49
  DEFAULT_FILENAME = "filename".freeze
50
50
 
51
- # Internal: Maximum number of bytes to read per line. Lines over this limit
52
- # will be truncated.
53
- MAX_LINE = 200
54
-
55
- # Internal: Maximum byte length of section name Strings. Names over this limit
56
- # will be truncated.
57
- MAX_SECTION_NAME = 500
58
-
59
- # Internal: Maximum byte length of property name String. Names over this limit
60
- # will be truncated.
61
- MAX_PROPERTY_NAME = 500
62
-
63
51
  # Internal: Maximum byte length of filename path. Paths over this limit will
64
52
  # default to global "*" properties.
65
53
  MAX_FILENAME = 4096
@@ -94,13 +82,13 @@ module EditorConfig
94
82
  case line
95
83
  when /\Aroot(\s+)?\=(\s+)?true\Z/i
96
84
  root = true
97
- when /\A\s*\[(?<name>.+)\]\s*\Z/
85
+ when /\A\s*\[(?<name>.{1,4096})\]\s*\Z/
98
86
  # section marker
99
- last_section = Regexp.last_match[:name][0, MAX_SECTION_NAME]
87
+ last_section = Regexp.last_match[:name]
100
88
  config[last_section] ||= {}
101
- when /\A\s*(?<name>[[:word:]]+)\s*(\=|:)\s*(?<value>.+)\s*\Z/
89
+ when /\A\s*(?<name>[[:word:]]{1,50})\s*(\=|:)\s*(?<value>.{1,255})\s*\Z/
102
90
  match = Regexp.last_match
103
- name, value = match[:name][0, MAX_PROPERTY_NAME].strip, match[:value].strip
91
+ name, value = match[:name].strip, match[:value].strip
104
92
  config[last_section][name] = value if last_section
105
93
  end
106
94
  end
@@ -1,4 +1,4 @@
1
1
  module EditorConfig
2
- VERSION = "0.2.0"
2
+ VERSION = "0.2.1"
3
3
  SPEC_VERSION = "0.9.1"
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: editorconfig
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - GitHub
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-05-18 00:00:00.000000000 Z
11
+ date: 2015-06-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: minitest