sugar-high 0.3.0 → 0.3.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/Rakefile +2 -2
- data/VERSION +1 -1
- data/lib/sugar-high/file.rb +1 -1
- data/spec/sugar-high/file/file_mutate_spec.rb +31 -0
- data/sugar-high.gemspec +62 -64
- metadata +7 -9
- data/.gitignore +0 -21
data/Rakefile
CHANGED
@@ -7,10 +7,10 @@ begin
|
|
7
7
|
gem.email = "kmandrup@gmail.com"
|
8
8
|
gem.homepage = "http://github.com/kristianmandrup/sugar-high"
|
9
9
|
gem.authors = ["Kristian Mandrup"]
|
10
|
-
gem.add_development_dependency "rspec", ">= 2.0.0
|
10
|
+
gem.add_development_dependency "rspec", ">= 2.0.0"
|
11
11
|
|
12
12
|
gem.add_dependency "require_all", "~> 1.2.0"
|
13
|
-
gem.add_dependency "mocha", "
|
13
|
+
gem.add_dependency "mocha", ">= 0.9.8"
|
14
14
|
end
|
15
15
|
Jeweler::GemcutterTasks.new
|
16
16
|
rescue LoadError
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.3.
|
1
|
+
0.3.1
|
data/lib/sugar-high/file.rb
CHANGED
@@ -10,6 +10,37 @@ describe "SugarHigh::File" do
|
|
10
10
|
File.delete replace_file if File.file?(replace_file)
|
11
11
|
end
|
12
12
|
|
13
|
+
describe '#append with :content option' do
|
14
|
+
let(:append_file) { fixture_file 'file.txt' }
|
15
|
+
|
16
|
+
it "should remove content from existing file" do
|
17
|
+
File.overwrite(append_file) do
|
18
|
+
'Hello You'
|
19
|
+
end
|
20
|
+
File.append append_file, :content => 'Appended'
|
21
|
+
content = File.read(replace_file)
|
22
|
+
content.should match /Hello You/
|
23
|
+
content.should match /Appended/
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
describe '#append with block' do
|
28
|
+
let(:append_file) { fixture_file 'file.txt' }
|
29
|
+
|
30
|
+
it "should remove content from existing file" do
|
31
|
+
File.overwrite(append_file) do
|
32
|
+
'Hello You'
|
33
|
+
end
|
34
|
+
File.append append_file do
|
35
|
+
'Appended'
|
36
|
+
end
|
37
|
+
content = File.read(replace_file)
|
38
|
+
content.should match /Hello You/
|
39
|
+
content.should match /Appended/
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
|
13
44
|
describe '#replace_content_from' do
|
14
45
|
let(:replace_file) { fixture_file 'file.txt' }
|
15
46
|
|
data/sugar-high.gemspec
CHANGED
@@ -1,84 +1,82 @@
|
|
1
1
|
# Generated by jeweler
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
-
# Instead, edit Jeweler::Tasks in Rakefile, and run
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{sugar-high}
|
8
|
-
s.version = "0.3.
|
8
|
+
s.version = "0.3.1"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Kristian Mandrup"]
|
12
|
-
s.date = %q{2010-
|
12
|
+
s.date = %q{2010-12-01}
|
13
13
|
s.description = %q{More Ruby sugar - inspired by the 'zuker' project}
|
14
14
|
s.email = %q{kmandrup@gmail.com}
|
15
15
|
s.extra_rdoc_files = [
|
16
16
|
"LICENSE",
|
17
|
-
|
17
|
+
"README.markdown"
|
18
18
|
]
|
19
19
|
s.files = [
|
20
20
|
".document",
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
"sugar-high.gemspec"
|
21
|
+
".rspec",
|
22
|
+
"LICENSE",
|
23
|
+
"README.markdown",
|
24
|
+
"Rakefile",
|
25
|
+
"VERSION",
|
26
|
+
"lib/sugar-high.rb",
|
27
|
+
"lib/sugar-high/alias.rb",
|
28
|
+
"lib/sugar-high/arguments.rb",
|
29
|
+
"lib/sugar-high/array.rb",
|
30
|
+
"lib/sugar-high/blank.rb",
|
31
|
+
"lib/sugar-high/file.rb",
|
32
|
+
"lib/sugar-high/hash.rb",
|
33
|
+
"lib/sugar-high/includes.rb",
|
34
|
+
"lib/sugar-high/kind_of.rb",
|
35
|
+
"lib/sugar-high/metaclass.rb",
|
36
|
+
"lib/sugar-high/methods.rb",
|
37
|
+
"lib/sugar-high/module.rb",
|
38
|
+
"lib/sugar-high/not.rb",
|
39
|
+
"lib/sugar-high/path.rb",
|
40
|
+
"lib/sugar-high/regexp.rb",
|
41
|
+
"lib/sugar-high/rspec/configure.rb",
|
42
|
+
"lib/sugar-high/rspec/matchers/have_aliases.rb",
|
43
|
+
"spec/fixtures/empty.txt",
|
44
|
+
"spec/fixtures/non-empty.txt",
|
45
|
+
"spec/spec_helper.rb",
|
46
|
+
"spec/sugar-high/alias_spec.rb",
|
47
|
+
"spec/sugar-high/arguments_spec.rb",
|
48
|
+
"spec/sugar-high/array_spec.rb",
|
49
|
+
"spec/sugar-high/blank_spec.rb",
|
50
|
+
"spec/sugar-high/file/file_mutate_spec.rb",
|
51
|
+
"spec/sugar-high/file/file_spec.rb",
|
52
|
+
"spec/sugar-high/hash_spec.rb",
|
53
|
+
"spec/sugar-high/includes_spec.rb",
|
54
|
+
"spec/sugar-high/kind_of_spec.rb",
|
55
|
+
"spec/sugar-high/methods_spec.rb",
|
56
|
+
"spec/sugar-high/module_spec.rb",
|
57
|
+
"spec/sugar-high/path_spec.rb",
|
58
|
+
"spec/sugar-high/regexp_spec.rb",
|
59
|
+
"sugar-high.gemspec"
|
61
60
|
]
|
62
61
|
s.homepage = %q{http://github.com/kristianmandrup/sugar-high}
|
63
|
-
s.rdoc_options = ["--charset=UTF-8"]
|
64
62
|
s.require_paths = ["lib"]
|
65
63
|
s.rubygems_version = %q{1.3.7}
|
66
64
|
s.summary = %q{Ruby convenience sugar packs!}
|
67
65
|
s.test_files = [
|
68
66
|
"spec/spec_helper.rb",
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
67
|
+
"spec/sugar-high/alias_spec.rb",
|
68
|
+
"spec/sugar-high/arguments_spec.rb",
|
69
|
+
"spec/sugar-high/array_spec.rb",
|
70
|
+
"spec/sugar-high/blank_spec.rb",
|
71
|
+
"spec/sugar-high/file/file_mutate_spec.rb",
|
72
|
+
"spec/sugar-high/file/file_spec.rb",
|
73
|
+
"spec/sugar-high/hash_spec.rb",
|
74
|
+
"spec/sugar-high/includes_spec.rb",
|
75
|
+
"spec/sugar-high/kind_of_spec.rb",
|
76
|
+
"spec/sugar-high/methods_spec.rb",
|
77
|
+
"spec/sugar-high/module_spec.rb",
|
78
|
+
"spec/sugar-high/path_spec.rb",
|
79
|
+
"spec/sugar-high/regexp_spec.rb"
|
82
80
|
]
|
83
81
|
|
84
82
|
if s.respond_to? :specification_version then
|
@@ -86,18 +84,18 @@ Gem::Specification.new do |s|
|
|
86
84
|
s.specification_version = 3
|
87
85
|
|
88
86
|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
89
|
-
s.add_development_dependency(%q<rspec>, [">= 2.0.0
|
87
|
+
s.add_development_dependency(%q<rspec>, [">= 2.0.0"])
|
90
88
|
s.add_runtime_dependency(%q<require_all>, ["~> 1.2.0"])
|
91
|
-
s.add_runtime_dependency(%q<mocha>, ["
|
89
|
+
s.add_runtime_dependency(%q<mocha>, [">= 0.9.8"])
|
92
90
|
else
|
93
|
-
s.add_dependency(%q<rspec>, [">= 2.0.0
|
91
|
+
s.add_dependency(%q<rspec>, [">= 2.0.0"])
|
94
92
|
s.add_dependency(%q<require_all>, ["~> 1.2.0"])
|
95
|
-
s.add_dependency(%q<mocha>, ["
|
93
|
+
s.add_dependency(%q<mocha>, [">= 0.9.8"])
|
96
94
|
end
|
97
95
|
else
|
98
|
-
s.add_dependency(%q<rspec>, [">= 2.0.0
|
96
|
+
s.add_dependency(%q<rspec>, [">= 2.0.0"])
|
99
97
|
s.add_dependency(%q<require_all>, ["~> 1.2.0"])
|
100
|
-
s.add_dependency(%q<mocha>, ["
|
98
|
+
s.add_dependency(%q<mocha>, [">= 0.9.8"])
|
101
99
|
end
|
102
100
|
end
|
103
101
|
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 3
|
8
|
-
-
|
9
|
-
version: 0.3.
|
8
|
+
- 1
|
9
|
+
version: 0.3.1
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Kristian Mandrup
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2010-
|
17
|
+
date: 2010-12-01 00:00:00 +01:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
@@ -29,8 +29,7 @@ dependencies:
|
|
29
29
|
- 2
|
30
30
|
- 0
|
31
31
|
- 0
|
32
|
-
|
33
|
-
version: 2.0.0.rc
|
32
|
+
version: 2.0.0
|
34
33
|
type: :development
|
35
34
|
version_requirements: *id001
|
36
35
|
- !ruby/object:Gem::Dependency
|
@@ -54,7 +53,7 @@ dependencies:
|
|
54
53
|
requirement: &id003 !ruby/object:Gem::Requirement
|
55
54
|
none: false
|
56
55
|
requirements:
|
57
|
-
- -
|
56
|
+
- - ">="
|
58
57
|
- !ruby/object:Gem::Version
|
59
58
|
segments:
|
60
59
|
- 0
|
@@ -74,7 +73,6 @@ extra_rdoc_files:
|
|
74
73
|
- README.markdown
|
75
74
|
files:
|
76
75
|
- .document
|
77
|
-
- .gitignore
|
78
76
|
- .rspec
|
79
77
|
- LICENSE
|
80
78
|
- README.markdown
|
@@ -119,8 +117,8 @@ homepage: http://github.com/kristianmandrup/sugar-high
|
|
119
117
|
licenses: []
|
120
118
|
|
121
119
|
post_install_message:
|
122
|
-
rdoc_options:
|
123
|
-
|
120
|
+
rdoc_options: []
|
121
|
+
|
124
122
|
require_paths:
|
125
123
|
- lib
|
126
124
|
required_ruby_version: !ruby/object:Gem::Requirement
|