basiszwo-reflection 0.5.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/.document +5 -0
- data/.gitignore +21 -0
- data/.yardoc +0 -0
- data/History.rdoc +21 -0
- data/LICENSE +20 -0
- data/README.rdoc +117 -0
- data/Rakefile +75 -0
- data/Reflection.gemspec +135 -0
- data/TODO.rdoc +38 -0
- data/VERSION +1 -0
- data/bin/reflection +5 -0
- data/doc/Reflection/CLI.html +153 -0
- data/doc/Reflection/Command/Apply.html +266 -0
- data/doc/Reflection/Command/Base.html +385 -0
- data/doc/Reflection/Command/Stash.html +342 -0
- data/doc/Reflection/Command.html +85 -0
- data/doc/Reflection/Config.html +902 -0
- data/doc/Reflection/ConfigArgumentError.html +92 -0
- data/doc/Reflection/Directory/Base.html +657 -0
- data/doc/Reflection/Directory/Stash.html +411 -0
- data/doc/Reflection/Directory.html +85 -0
- data/doc/Reflection/Rails.html +409 -0
- data/doc/Reflection/Repository.html +745 -0
- data/doc/Reflection/Support/Home.html +182 -0
- data/doc/Reflection/Support/Log.html +222 -0
- data/doc/Reflection/Support.html +141 -0
- data/doc/Reflection/Validations.html +135 -0
- data/doc/Reflection.html +285 -0
- data/doc/_index.html +267 -0
- data/doc/class_list.html +197 -0
- data/doc/css/common.css +1 -0
- data/doc/css/full_list.css +23 -0
- data/doc/css/style.css +261 -0
- data/doc/file.README.html +200 -0
- data/doc/file_list.html +29 -0
- data/doc/index.html +200 -0
- data/doc/js/app.js +91 -0
- data/doc/js/full_list.js +39 -0
- data/doc/js/jquery.js +19 -0
- data/doc/method_list.html +572 -0
- data/doc/top-level-namespace.html +80 -0
- data/lib/reflection/cli.rb +35 -0
- data/lib/reflection/command/apply.rb +71 -0
- data/lib/reflection/command/base.rb +28 -0
- data/lib/reflection/command/stash.rb +64 -0
- data/lib/reflection/command.rb +7 -0
- data/lib/reflection/config.rb +139 -0
- data/lib/reflection/directory/base.rb +58 -0
- data/lib/reflection/directory/stash.rb +30 -0
- data/lib/reflection/directory.rb +6 -0
- data/lib/reflection/rails/database.rb +96 -0
- data/lib/reflection/rails.rb +40 -0
- data/lib/reflection/repository.rb +71 -0
- data/lib/reflection/support/home.rb +17 -0
- data/lib/reflection/support/log.rb +20 -0
- data/lib/reflection/support.rb +12 -0
- data/lib/reflection/validations.rb +23 -0
- data/lib/reflection.rb +32 -0
- data/spec/reflection/cli_spec.rb +41 -0
- data/spec/reflection/command/stash_spec.rb +104 -0
- data/spec/reflection/config_spec.rb +126 -0
- data/spec/reflection/directory/base_spec.rb +38 -0
- data/spec/reflection/directory/stash_spec.rb +39 -0
- data/spec/reflection/rails/database_spec.rb +161 -0
- data/spec/reflection/rails_spec.rb +62 -0
- data/spec/reflection/repository_spec.rb +71 -0
- data/spec/reflection/support/home_spec.rb +30 -0
- data/spec/reflection/support_spec.rb +4 -0
- data/spec/reflection_spec.rb +21 -0
- data/spec/spec.opts +1 -0
- data/spec/spec_helper.rb +15 -0
- metadata +157 -0
@@ -0,0 +1,30 @@
|
|
1
|
+
require File.dirname(__FILE__) + '/../../spec_helper'
|
2
|
+
|
3
|
+
describe Reflection::Support::Home do
|
4
|
+
before(:all) do
|
5
|
+
@original_home_env = ENV['HOME']
|
6
|
+
ENV['HOME'] = "/test/home"
|
7
|
+
end
|
8
|
+
|
9
|
+
before(:each) do
|
10
|
+
@home = Reflection::Support::Home.new
|
11
|
+
end
|
12
|
+
|
13
|
+
describe '#path' do
|
14
|
+
it 'should generate HOME_DIR/.reflection' do
|
15
|
+
@home.path.should eql('/test/home/.reflection')
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
describe '#create' do
|
20
|
+
it 'should create the directory' do
|
21
|
+
File.stub!(:exist?).and_return(false)
|
22
|
+
Dir.should_receive(:mkdir).with('/test/home/.reflection')
|
23
|
+
@home.create
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
after(:all) do
|
28
|
+
ENV['HOME'] = @original_home_env
|
29
|
+
end
|
30
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
|
2
|
+
|
3
|
+
describe "Reflection" do
|
4
|
+
|
5
|
+
describe '#boot' do
|
6
|
+
before(:each) do
|
7
|
+
Reflection::CLI.stub!(:run!)
|
8
|
+
end
|
9
|
+
|
10
|
+
it 'should init a Home instance which represents ~/.reflection' do
|
11
|
+
Reflection.boot!([])
|
12
|
+
Reflection.home.should be_kind_of(Reflection::Support::Home)
|
13
|
+
end
|
14
|
+
|
15
|
+
it 'should run the CLI processor' do
|
16
|
+
Reflection::CLI.should_receive(:run!).with(['args'])
|
17
|
+
Reflection.boot!(['args'])
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
end
|
data/spec/spec.opts
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
--color
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
$LOAD_PATH.unshift(File.dirname(__FILE__))
|
2
|
+
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
|
3
|
+
require 'reflection'
|
4
|
+
require 'spec'
|
5
|
+
require 'spec/autorun'
|
6
|
+
|
7
|
+
Spec::Runner.configure do |config|
|
8
|
+
config.before(:each) do
|
9
|
+
@global_mock_log = mock('Log')
|
10
|
+
@global_mock_log.stub!(:debug)
|
11
|
+
@global_mock_log.stub!(:info)
|
12
|
+
@global_mock_log.stub!(:error)
|
13
|
+
Reflection.stub!(:log).and_return(@global_mock_log)
|
14
|
+
end
|
15
|
+
end
|
metadata
ADDED
@@ -0,0 +1,157 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: basiszwo-reflection
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.5.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Stefan Botzenhart
|
8
|
+
- Andreas Wolff
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
|
13
|
+
date: 2010-01-29 00:00:00 +01:00
|
14
|
+
default_executable: reflection
|
15
|
+
dependencies:
|
16
|
+
- !ruby/object:Gem::Dependency
|
17
|
+
name: rspec
|
18
|
+
type: :development
|
19
|
+
version_requirement:
|
20
|
+
version_requirements: !ruby/object:Gem::Requirement
|
21
|
+
requirements:
|
22
|
+
- - ">="
|
23
|
+
- !ruby/object:Gem::Version
|
24
|
+
version: 1.2.9
|
25
|
+
version:
|
26
|
+
- !ruby/object:Gem::Dependency
|
27
|
+
name: git
|
28
|
+
type: :runtime
|
29
|
+
version_requirement:
|
30
|
+
version_requirements: !ruby/object:Gem::Requirement
|
31
|
+
requirements:
|
32
|
+
- - ">="
|
33
|
+
- !ruby/object:Gem::Version
|
34
|
+
version: 1.2.5
|
35
|
+
version:
|
36
|
+
description: "\n Reflection is designed to keep your development system in sync with your production system's files and database (by dumping).\n It uses a shared git repository to store these files, which allows you to mirror your production environment without the need of \n direct access to your production servers.\n "
|
37
|
+
email: stefan@ninjaconcept.com
|
38
|
+
executables:
|
39
|
+
- reflection
|
40
|
+
extensions: []
|
41
|
+
|
42
|
+
extra_rdoc_files:
|
43
|
+
- LICENSE
|
44
|
+
- README.rdoc
|
45
|
+
files:
|
46
|
+
- .document
|
47
|
+
- .gitignore
|
48
|
+
- .yardoc
|
49
|
+
- History.rdoc
|
50
|
+
- LICENSE
|
51
|
+
- README.rdoc
|
52
|
+
- Rakefile
|
53
|
+
- Reflection.gemspec
|
54
|
+
- TODO.rdoc
|
55
|
+
- VERSION
|
56
|
+
- bin/reflection
|
57
|
+
- doc/Reflection.html
|
58
|
+
- doc/Reflection/CLI.html
|
59
|
+
- doc/Reflection/Command.html
|
60
|
+
- doc/Reflection/Command/Apply.html
|
61
|
+
- doc/Reflection/Command/Base.html
|
62
|
+
- doc/Reflection/Command/Stash.html
|
63
|
+
- doc/Reflection/Config.html
|
64
|
+
- doc/Reflection/ConfigArgumentError.html
|
65
|
+
- doc/Reflection/Directory.html
|
66
|
+
- doc/Reflection/Directory/Base.html
|
67
|
+
- doc/Reflection/Directory/Stash.html
|
68
|
+
- doc/Reflection/Rails.html
|
69
|
+
- doc/Reflection/Repository.html
|
70
|
+
- doc/Reflection/Support.html
|
71
|
+
- doc/Reflection/Support/Home.html
|
72
|
+
- doc/Reflection/Support/Log.html
|
73
|
+
- doc/Reflection/Validations.html
|
74
|
+
- doc/_index.html
|
75
|
+
- doc/class_list.html
|
76
|
+
- doc/css/common.css
|
77
|
+
- doc/css/full_list.css
|
78
|
+
- doc/css/style.css
|
79
|
+
- doc/file.README.html
|
80
|
+
- doc/file_list.html
|
81
|
+
- doc/index.html
|
82
|
+
- doc/js/app.js
|
83
|
+
- doc/js/full_list.js
|
84
|
+
- doc/js/jquery.js
|
85
|
+
- doc/method_list.html
|
86
|
+
- doc/top-level-namespace.html
|
87
|
+
- lib/reflection.rb
|
88
|
+
- lib/reflection/cli.rb
|
89
|
+
- lib/reflection/command.rb
|
90
|
+
- lib/reflection/command/apply.rb
|
91
|
+
- lib/reflection/command/base.rb
|
92
|
+
- lib/reflection/command/stash.rb
|
93
|
+
- lib/reflection/config.rb
|
94
|
+
- lib/reflection/directory.rb
|
95
|
+
- lib/reflection/directory/base.rb
|
96
|
+
- lib/reflection/directory/stash.rb
|
97
|
+
- lib/reflection/rails.rb
|
98
|
+
- lib/reflection/rails/database.rb
|
99
|
+
- lib/reflection/repository.rb
|
100
|
+
- lib/reflection/support.rb
|
101
|
+
- lib/reflection/support/home.rb
|
102
|
+
- lib/reflection/support/log.rb
|
103
|
+
- lib/reflection/validations.rb
|
104
|
+
- spec/reflection/cli_spec.rb
|
105
|
+
- spec/reflection/command/stash_spec.rb
|
106
|
+
- spec/reflection/config_spec.rb
|
107
|
+
- spec/reflection/directory/base_spec.rb
|
108
|
+
- spec/reflection/directory/stash_spec.rb
|
109
|
+
- spec/reflection/rails/database_spec.rb
|
110
|
+
- spec/reflection/rails_spec.rb
|
111
|
+
- spec/reflection/repository_spec.rb
|
112
|
+
- spec/reflection/support/home_spec.rb
|
113
|
+
- spec/reflection/support_spec.rb
|
114
|
+
- spec/reflection_spec.rb
|
115
|
+
- spec/spec.opts
|
116
|
+
- spec/spec_helper.rb
|
117
|
+
has_rdoc: true
|
118
|
+
homepage: http://github.com/basiszwo/reflection
|
119
|
+
licenses: []
|
120
|
+
|
121
|
+
post_install_message:
|
122
|
+
rdoc_options:
|
123
|
+
- --charset=UTF-8
|
124
|
+
require_paths:
|
125
|
+
- lib
|
126
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
127
|
+
requirements:
|
128
|
+
- - ">="
|
129
|
+
- !ruby/object:Gem::Version
|
130
|
+
version: "0"
|
131
|
+
version:
|
132
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
133
|
+
requirements:
|
134
|
+
- - ">="
|
135
|
+
- !ruby/object:Gem::Version
|
136
|
+
version: "0"
|
137
|
+
version:
|
138
|
+
requirements: []
|
139
|
+
|
140
|
+
rubyforge_project:
|
141
|
+
rubygems_version: 1.3.5
|
142
|
+
signing_key:
|
143
|
+
specification_version: 3
|
144
|
+
summary: Keep your development machine in sync with production.
|
145
|
+
test_files:
|
146
|
+
- spec/reflection/cli_spec.rb
|
147
|
+
- spec/reflection/command/stash_spec.rb
|
148
|
+
- spec/reflection/config_spec.rb
|
149
|
+
- spec/reflection/directory/base_spec.rb
|
150
|
+
- spec/reflection/directory/stash_spec.rb
|
151
|
+
- spec/reflection/rails/database_spec.rb
|
152
|
+
- spec/reflection/rails_spec.rb
|
153
|
+
- spec/reflection/repository_spec.rb
|
154
|
+
- spec/reflection/support/home_spec.rb
|
155
|
+
- spec/reflection/support_spec.rb
|
156
|
+
- spec/reflection_spec.rb
|
157
|
+
- spec/spec_helper.rb
|