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 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.rc"
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", "~> 0.9.8"
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.0
1
+ 0.3.1
@@ -31,7 +31,7 @@ class File
31
31
  end
32
32
 
33
33
  def self.append path, content=nil, &block
34
- File.open(path, 'w+') do |f|
34
+ File.open(path, 'a') do |f|
35
35
  f.puts content ||= yield
36
36
  end
37
37
  end
@@ -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 the gemspec command
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.0"
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-10-21}
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
- "README.markdown"
17
+ "README.markdown"
18
18
  ]
19
19
  s.files = [
20
20
  ".document",
21
- ".gitignore",
22
- ".rspec",
23
- "LICENSE",
24
- "README.markdown",
25
- "Rakefile",
26
- "VERSION",
27
- "lib/sugar-high.rb",
28
- "lib/sugar-high/alias.rb",
29
- "lib/sugar-high/arguments.rb",
30
- "lib/sugar-high/array.rb",
31
- "lib/sugar-high/blank.rb",
32
- "lib/sugar-high/file.rb",
33
- "lib/sugar-high/hash.rb",
34
- "lib/sugar-high/includes.rb",
35
- "lib/sugar-high/kind_of.rb",
36
- "lib/sugar-high/metaclass.rb",
37
- "lib/sugar-high/methods.rb",
38
- "lib/sugar-high/module.rb",
39
- "lib/sugar-high/not.rb",
40
- "lib/sugar-high/path.rb",
41
- "lib/sugar-high/regexp.rb",
42
- "lib/sugar-high/rspec/configure.rb",
43
- "lib/sugar-high/rspec/matchers/have_aliases.rb",
44
- "spec/fixtures/empty.txt",
45
- "spec/fixtures/non-empty.txt",
46
- "spec/spec_helper.rb",
47
- "spec/sugar-high/alias_spec.rb",
48
- "spec/sugar-high/arguments_spec.rb",
49
- "spec/sugar-high/array_spec.rb",
50
- "spec/sugar-high/blank_spec.rb",
51
- "spec/sugar-high/file/file_mutate_spec.rb",
52
- "spec/sugar-high/file/file_spec.rb",
53
- "spec/sugar-high/hash_spec.rb",
54
- "spec/sugar-high/includes_spec.rb",
55
- "spec/sugar-high/kind_of_spec.rb",
56
- "spec/sugar-high/methods_spec.rb",
57
- "spec/sugar-high/module_spec.rb",
58
- "spec/sugar-high/path_spec.rb",
59
- "spec/sugar-high/regexp_spec.rb",
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
- "spec/sugar-high/alias_spec.rb",
70
- "spec/sugar-high/arguments_spec.rb",
71
- "spec/sugar-high/array_spec.rb",
72
- "spec/sugar-high/blank_spec.rb",
73
- "spec/sugar-high/file/file_mutate_spec.rb",
74
- "spec/sugar-high/file/file_spec.rb",
75
- "spec/sugar-high/hash_spec.rb",
76
- "spec/sugar-high/includes_spec.rb",
77
- "spec/sugar-high/kind_of_spec.rb",
78
- "spec/sugar-high/methods_spec.rb",
79
- "spec/sugar-high/module_spec.rb",
80
- "spec/sugar-high/path_spec.rb",
81
- "spec/sugar-high/regexp_spec.rb"
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.rc"])
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>, ["~> 0.9.8"])
89
+ s.add_runtime_dependency(%q<mocha>, [">= 0.9.8"])
92
90
  else
93
- s.add_dependency(%q<rspec>, [">= 2.0.0.rc"])
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>, ["~> 0.9.8"])
93
+ s.add_dependency(%q<mocha>, [">= 0.9.8"])
96
94
  end
97
95
  else
98
- s.add_dependency(%q<rspec>, [">= 2.0.0.rc"])
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>, ["~> 0.9.8"])
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
- - 0
9
- version: 0.3.0
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-10-21 00:00:00 +02:00
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
- - rc
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
- - --charset=UTF-8
120
+ rdoc_options: []
121
+
124
122
  require_paths:
125
123
  - lib
126
124
  required_ruby_version: !ruby/object:Gem::Requirement
data/.gitignore DELETED
@@ -1,21 +0,0 @@
1
- ## MAC OS
2
- .DS_Store
3
-
4
- ## TEXTMATE
5
- *.tmproj
6
- tmtags
7
-
8
- ## EMACS
9
- *~
10
- \#*
11
- .\#*
12
-
13
- ## VIM
14
- *.swp
15
-
16
- ## PROJECT::GENERAL
17
- coverage
18
- rdoc
19
- pkg
20
-
21
- ## PROJECT::SPECIFIC