ric 0.14.6 → 0.15.0
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 +4 -4
- data/CHANGELOG.md +5 -0
- data/VERSION +1 -1
- data/bin/riclib-test +1 -1
- data/bin/septober +632 -366
- data/bin/septober-cli +650 -0
- data/bin/septober-cli-26 +650 -0
- data/blueprint.yaml +1 -1
- data/lib/ric/conf.rb +1 -1
- data/lib/ric/files.rb +3 -3
- data/lib/ric.rb +12 -9
- metadata +19 -70
- data/Gemfile +0 -23
- data/Makefile +0 -59
- data/Manifest +0 -32
- data/Rakefile +0 -56
- data/TODO +0 -3
- data/ric.gemspec +0 -27
- data/test/sample_conf.yml +0 -17
- data/test/strings_helper.rb +0 -17
- data/test/test_helper.rb +0 -42
- data/var/www/index.html +0 -5
data/lib/ric.rb
CHANGED
|
@@ -1,26 +1,29 @@
|
|
|
1
|
-
|
|
2
1
|
require 'ric/colors'
|
|
3
2
|
require 'ric/conf'
|
|
4
3
|
require 'ric/debug'
|
|
5
4
|
require 'ric/files'
|
|
6
|
-
require 'ric/debug'
|
|
7
5
|
require 'ric/html'
|
|
8
6
|
require 'ric/zibaldone'
|
|
9
|
-
|
|
10
7
|
require 'ruby_classes/arrays'
|
|
11
8
|
|
|
12
9
|
module Ric
|
|
13
|
-
|
|
14
|
-
|
|
10
|
+
VERSION = File.read(File.expand_path('../../VERSION', __FILE__)).strip rescue '0.15.0'
|
|
11
|
+
|
|
12
|
+
def self.version
|
|
13
|
+
VERSION
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
def self.say_hello
|
|
17
|
+
puts "Hello from Ric gem v#{VERSION} (Ruby #{RUBY_VERSION})!"
|
|
18
|
+
end
|
|
19
|
+
|
|
15
20
|
def self.ric_help
|
|
16
|
-
puts
|
|
21
|
+
puts "Ric gem v#{VERSION} - includes septober / septober-cli, colors, debug, conf helpers."
|
|
17
22
|
end
|
|
18
|
-
|
|
19
23
|
end
|
|
20
24
|
|
|
21
25
|
include Ric::Colors
|
|
22
26
|
include Ric::Conf
|
|
23
27
|
include Ric::Debug
|
|
24
28
|
include Ric::Files
|
|
25
|
-
|
|
26
|
-
include RubyClasses::Array
|
|
29
|
+
include RubyClasses::Array
|
metadata
CHANGED
|
@@ -1,75 +1,39 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: ric
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.15.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Riccardo Carlesso
|
|
8
|
-
autorequire:
|
|
9
8
|
bindir: bin
|
|
10
9
|
cert_chain: []
|
|
11
|
-
date:
|
|
12
|
-
dependencies:
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
- - ">="
|
|
18
|
-
- !ruby/object:Gem::Version
|
|
19
|
-
version: '0'
|
|
20
|
-
type: :development
|
|
21
|
-
prerelease: false
|
|
22
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
23
|
-
requirements:
|
|
24
|
-
- - ">="
|
|
25
|
-
- !ruby/object:Gem::Version
|
|
26
|
-
version: '0'
|
|
27
|
-
description: "My first gem with various utilities (colors and tests now). \n My name
|
|
28
|
-
is Riccardo, hence 'ric' (ok I admit it, this was just ot prove Im able to build
|
|
29
|
-
a sentence\n with hence!)"
|
|
30
|
-
email: "['p','ll','diusbonton+ricgem'].join('a') @ gm il com"
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
11
|
+
dependencies: []
|
|
12
|
+
description: Riccardo's personal Ruby gem including terminal colors, config helpers,
|
|
13
|
+
and the Ruby 3.4.5+ Septober CLI (septober & septober-cli).
|
|
14
|
+
email:
|
|
15
|
+
- palladiusbonton+ricgem@gmail.com
|
|
31
16
|
executables:
|
|
32
17
|
- itunes.rb
|
|
33
18
|
- ric
|
|
34
19
|
- ric-xcopy
|
|
35
20
|
- riclib-test
|
|
36
21
|
- septober
|
|
22
|
+
- septober-cli
|
|
23
|
+
- septober-cli-26
|
|
37
24
|
extensions: []
|
|
38
|
-
extra_rdoc_files:
|
|
39
|
-
- CHANGELOG.md
|
|
40
|
-
- README.md
|
|
41
|
-
- TODO
|
|
42
|
-
- bin/itunes.rb
|
|
43
|
-
- bin/ric
|
|
44
|
-
- bin/ric-xcopy
|
|
45
|
-
- bin/riclib-test
|
|
46
|
-
- bin/septober
|
|
47
|
-
- lib/rails/acts_as_carlesso.rb
|
|
48
|
-
- lib/rails/helpers/rails_helper.rb
|
|
49
|
-
- lib/ric.rb
|
|
50
|
-
- lib/ric/colors.rb
|
|
51
|
-
- lib/ric/conf.rb
|
|
52
|
-
- lib/ric/debug.rb
|
|
53
|
-
- lib/ric/files.rb
|
|
54
|
-
- lib/ric/html.rb
|
|
55
|
-
- lib/ric/zibaldone.rb
|
|
56
|
-
- lib/ruby_classes/arrays.rb
|
|
57
|
-
- lib/ruby_classes/strings.rb
|
|
58
|
-
- lib/tmp/uniquify.rb
|
|
25
|
+
extra_rdoc_files: []
|
|
59
26
|
files:
|
|
60
27
|
- CHANGELOG.md
|
|
61
|
-
- Gemfile
|
|
62
|
-
- Makefile
|
|
63
|
-
- Manifest
|
|
64
28
|
- README.md
|
|
65
|
-
- Rakefile
|
|
66
|
-
- TODO
|
|
67
29
|
- VERSION
|
|
68
30
|
- bin/itunes.rb
|
|
69
31
|
- bin/ric
|
|
70
32
|
- bin/ric-xcopy
|
|
71
33
|
- bin/riclib-test
|
|
72
34
|
- bin/septober
|
|
35
|
+
- bin/septober-cli
|
|
36
|
+
- bin/septober-cli-26
|
|
73
37
|
- blueprint.yaml
|
|
74
38
|
- init.rb
|
|
75
39
|
- lib/rails/acts_as_carlesso.rb
|
|
@@ -85,40 +49,25 @@ files:
|
|
|
85
49
|
- lib/ruby_classes/strings.rb
|
|
86
50
|
- lib/tmp/uniquify.rb
|
|
87
51
|
- rails/init.rb
|
|
88
|
-
|
|
89
|
-
- test/sample_conf.yml
|
|
90
|
-
- test/strings_helper.rb
|
|
91
|
-
- test/test_helper.rb
|
|
92
|
-
- var/www/index.html
|
|
93
|
-
homepage: http://github.com/palladius/ric
|
|
52
|
+
homepage: https://github.com/palladius/ric
|
|
94
53
|
licenses:
|
|
95
54
|
- MIT
|
|
96
55
|
metadata: {}
|
|
97
|
-
|
|
98
|
-
rdoc_options:
|
|
99
|
-
- "--line-numbers"
|
|
100
|
-
- "--title"
|
|
101
|
-
- Ric
|
|
102
|
-
- "--main"
|
|
103
|
-
- README.md
|
|
56
|
+
rdoc_options: []
|
|
104
57
|
require_paths:
|
|
105
58
|
- lib
|
|
106
59
|
required_ruby_version: !ruby/object:Gem::Requirement
|
|
107
60
|
requirements:
|
|
108
61
|
- - ">="
|
|
109
62
|
- !ruby/object:Gem::Version
|
|
110
|
-
version:
|
|
63
|
+
version: 3.0.0
|
|
111
64
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
112
65
|
requirements:
|
|
113
66
|
- - ">="
|
|
114
67
|
- !ruby/object:Gem::Version
|
|
115
|
-
version: '
|
|
68
|
+
version: '0'
|
|
116
69
|
requirements: []
|
|
117
|
-
rubygems_version: 3.
|
|
118
|
-
signing_key:
|
|
70
|
+
rubygems_version: 3.6.9
|
|
119
71
|
specification_version: 4
|
|
120
|
-
summary:
|
|
121
|
-
|
|
122
|
-
hence!)
|
|
123
|
-
test_files:
|
|
124
|
-
- test/test_helper.rb
|
|
72
|
+
summary: Riccardo Carlesso's utility gem (colors, helpers, and Septober CLI)
|
|
73
|
+
test_files: []
|
data/Gemfile
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
# Scopiazzed from Gruff gem
|
|
2
|
-
|
|
3
|
-
source 'https://rubygems.org'
|
|
4
|
-
|
|
5
|
-
ruby '>= 2.7.2'
|
|
6
|
-
|
|
7
|
-
# Specify your gem's dependencies in sakura.gemspec
|
|
8
|
-
gem 'echoe'
|
|
9
|
-
#gem 'echoe', '= 4.6.3'
|
|
10
|
-
#gem 'activesupport'
|
|
11
|
-
#gem 'activeresource'
|
|
12
|
-
gem 'lolcat'
|
|
13
|
-
#gem 'stringio' # 3.0.1 # latest version yeilds error!
|
|
14
|
-
# gem 'stringio', '= 3.0.0'
|
|
15
|
-
|
|
16
|
-
group :test do
|
|
17
|
-
gem 'rake'
|
|
18
|
-
gem 'echoe'
|
|
19
|
-
gem 'test-unit'
|
|
20
|
-
gem 'webrick'
|
|
21
|
-
gem 'activesupport'
|
|
22
|
-
end
|
|
23
|
-
|
data/Makefile
DELETED
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
# Makefile before I learn how to use a Rakefile appropriately :P
|
|
3
|
-
VERSION = $(shell cat VERSION)
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
rake-help:
|
|
7
|
-
echo HELP
|
|
8
|
-
bundle exec rake --tasks
|
|
9
|
-
|
|
10
|
-
clean-install: clean
|
|
11
|
-
echo Cleaning up downloadded libraries and doing a fresh install.
|
|
12
|
-
make install
|
|
13
|
-
|
|
14
|
-
install:
|
|
15
|
-
echo Installing dependencies for ric:$(VERSION) on vendor/bundle
|
|
16
|
-
bundle exec ruby -v
|
|
17
|
-
bundle install --path vendor/bundle
|
|
18
|
-
ls -al vendor/bundle/ruby/
|
|
19
|
-
|
|
20
|
-
# questo dovrebbe essere un build
|
|
21
|
-
build: install
|
|
22
|
-
#sbin/rake-deploy1.sh
|
|
23
|
-
bundle exec rake build
|
|
24
|
-
echo OK Build now lets create release..
|
|
25
|
-
bundle exec rake release
|
|
26
|
-
echo Correctly built and deployed version $(VERSION)
|
|
27
|
-
|
|
28
|
-
deploy-to-rubygems: build
|
|
29
|
-
bundle exec rake deploy
|
|
30
|
-
yellow gem push ric-0-0-0.gem or maybe $(VERSION)
|
|
31
|
-
|
|
32
|
-
# funge
|
|
33
|
-
docs:
|
|
34
|
-
bundle exec rake rdoc
|
|
35
|
-
|
|
36
|
-
clean:
|
|
37
|
-
rm -rf pkg/ doc/ Gemfile.lock vendor/
|
|
38
|
-
|
|
39
|
-
test:
|
|
40
|
-
echo credo non sia ancora implementato ma proviamo...
|
|
41
|
-
rake test
|
|
42
|
-
|
|
43
|
-
versions:
|
|
44
|
-
ruby -v
|
|
45
|
-
gem -v
|
|
46
|
-
bundle -v
|
|
47
|
-
|
|
48
|
-
build2022:
|
|
49
|
-
gem build ric.gemspec
|
|
50
|
-
@white Riccardo now try for testing: gem install ./ric$(VERSION).gem
|
|
51
|
-
|
|
52
|
-
release2022: build2022
|
|
53
|
-
@yellow Lets see if this works... seems to find a strangely DIFFERENT name..
|
|
54
|
-
echodo gem release
|
|
55
|
-
|
|
56
|
-
doc2022:
|
|
57
|
-
#I dont put this in Gemfile since it doesnt need be shipped with the gem..
|
|
58
|
-
gem install yard
|
|
59
|
-
yard doc
|
data/Manifest
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
CHANGELOG.md
|
|
2
|
-
Gemfile
|
|
3
|
-
Makefile
|
|
4
|
-
Manifest
|
|
5
|
-
README.md
|
|
6
|
-
Rakefile
|
|
7
|
-
TODO
|
|
8
|
-
VERSION
|
|
9
|
-
bin/itunes.rb
|
|
10
|
-
bin/ric
|
|
11
|
-
bin/ric-xcopy
|
|
12
|
-
bin/riclib-test
|
|
13
|
-
bin/septober
|
|
14
|
-
blueprint.yaml
|
|
15
|
-
init.rb
|
|
16
|
-
lib/rails/acts_as_carlesso.rb
|
|
17
|
-
lib/rails/helpers/rails_helper.rb
|
|
18
|
-
lib/ric.rb
|
|
19
|
-
lib/ric/colors.rb
|
|
20
|
-
lib/ric/conf.rb
|
|
21
|
-
lib/ric/debug.rb
|
|
22
|
-
lib/ric/files.rb
|
|
23
|
-
lib/ric/html.rb
|
|
24
|
-
lib/ric/zibaldone.rb
|
|
25
|
-
lib/ruby_classes/arrays.rb
|
|
26
|
-
lib/ruby_classes/strings.rb
|
|
27
|
-
lib/tmp/uniquify.rb
|
|
28
|
-
rails/init.rb
|
|
29
|
-
test/sample_conf.yml
|
|
30
|
-
test/strings_helper.rb
|
|
31
|
-
test/test_helper.rb
|
|
32
|
-
var/www/index.html
|
data/Rakefile
DELETED
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
#require 'rubygems'
|
|
2
|
-
#require 'rake'
|
|
3
|
-
require 'echoe'
|
|
4
|
-
|
|
5
|
-
# Fix for Echoe monkey-patch of Gem::Specification#validate which is broken in Ruby 3.x
|
|
6
|
-
# Echoe defines it with 0 arguments, but modern Rubygems calls it with 1 or 2.
|
|
7
|
-
module Gem
|
|
8
|
-
class Specification
|
|
9
|
-
def validate(*args)
|
|
10
|
-
begin
|
|
11
|
-
old_validate(*args)
|
|
12
|
-
rescue Gem::InvalidSpecificationException
|
|
13
|
-
if platform =~ /(#{PLATFORM_CROSS_TARGETS.join("|")})/i
|
|
14
|
-
true
|
|
15
|
-
else
|
|
16
|
-
raise Gem::InvalidSpecificationException, "Unknown package target \"#{platform}\"."
|
|
17
|
-
end
|
|
18
|
-
end
|
|
19
|
-
end
|
|
20
|
-
end
|
|
21
|
-
end
|
|
22
|
-
|
|
23
|
-
version = File.read('VERSION').chomp # rescue "0.0.42_bugged"
|
|
24
|
-
# puts "Beware ECHOE embedded in Rakefile. Version: '#{version}'"
|
|
25
|
-
|
|
26
|
-
Echoe.new('ric', version ) do |p|
|
|
27
|
-
p.project = "palladius"
|
|
28
|
-
p.summary = "My first gem with various utilities (colors and tests now).
|
|
29
|
-
My name is Riccardo, hence 'ric' (ok I admit it, this was just ot prove Im able to build a sentence
|
|
30
|
-
with hence!)"
|
|
31
|
-
p.url = "http://github.com/palladius/ric"
|
|
32
|
-
p.author = "Riccardo Carlesso"
|
|
33
|
-
p.licenses = "MIT" # see LICENSE
|
|
34
|
-
p.email = "['p','ll','diusbonton+ricgem'].join('a') @ gm il com"
|
|
35
|
-
p.retain_gemspec = true
|
|
36
|
-
p.private_key = nil
|
|
37
|
-
p.certificate_chain = nil
|
|
38
|
-
p.ignore_pattern = [
|
|
39
|
-
"tmp/*",
|
|
40
|
-
"docs/*",
|
|
41
|
-
"sbin/*",
|
|
42
|
-
"script/*",
|
|
43
|
-
"tmp/*", "tmp/*/*", "tmp/*/*/*",
|
|
44
|
-
"images/*/*/*", "images/*/*", 'images',
|
|
45
|
-
"private/*",
|
|
46
|
-
".noheroku",
|
|
47
|
-
"vendor", "vendor/**/*"
|
|
48
|
-
]
|
|
49
|
-
p.development_dependencies = [
|
|
50
|
-
# 'activeresource',
|
|
51
|
-
'echoe'
|
|
52
|
-
]
|
|
53
|
-
p.runtime_dependencies = [
|
|
54
|
-
# 'activeresource'
|
|
55
|
-
]
|
|
56
|
-
end
|
data/TODO
DELETED
data/ric.gemspec
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
# -*- encoding: utf-8 -*-
|
|
2
|
-
# stub: ric 0.14.6 ruby lib
|
|
3
|
-
|
|
4
|
-
Gem::Specification.new do |s|
|
|
5
|
-
s.name = "ric".freeze
|
|
6
|
-
s.version = "0.14.6".freeze
|
|
7
|
-
|
|
8
|
-
s.required_rubygems_version = Gem::Requirement.new(">= 1.2".freeze) if s.respond_to? :required_rubygems_version=
|
|
9
|
-
s.require_paths = ["lib".freeze]
|
|
10
|
-
s.authors = ["Riccardo Carlesso".freeze]
|
|
11
|
-
s.date = "2026-01-19"
|
|
12
|
-
s.description = "My first gem with various utilities (colors and tests now). \n My name is Riccardo, hence 'ric' (ok I admit it, this was just ot prove Im able to build a sentence\n with hence!)".freeze
|
|
13
|
-
s.email = "['p','ll','diusbonton+ricgem'].join('a') @ gm il com".freeze
|
|
14
|
-
s.executables = ["itunes.rb".freeze, "ric".freeze, "ric-xcopy".freeze, "riclib-test".freeze, "septober".freeze]
|
|
15
|
-
s.extra_rdoc_files = ["CHANGELOG.md".freeze, "README.md".freeze, "TODO".freeze, "bin/itunes.rb".freeze, "bin/ric".freeze, "bin/ric-xcopy".freeze, "bin/riclib-test".freeze, "bin/septober".freeze, "lib/rails/acts_as_carlesso.rb".freeze, "lib/rails/helpers/rails_helper.rb".freeze, "lib/ric.rb".freeze, "lib/ric/colors.rb".freeze, "lib/ric/conf.rb".freeze, "lib/ric/debug.rb".freeze, "lib/ric/files.rb".freeze, "lib/ric/html.rb".freeze, "lib/ric/zibaldone.rb".freeze, "lib/ruby_classes/arrays.rb".freeze, "lib/ruby_classes/strings.rb".freeze, "lib/tmp/uniquify.rb".freeze]
|
|
16
|
-
s.files = ["CHANGELOG.md".freeze, "Gemfile".freeze, "Makefile".freeze, "Manifest".freeze, "README.md".freeze, "Rakefile".freeze, "TODO".freeze, "VERSION".freeze, "bin/itunes.rb".freeze, "bin/ric".freeze, "bin/ric-xcopy".freeze, "bin/riclib-test".freeze, "bin/septober".freeze, "blueprint.yaml".freeze, "init.rb".freeze, "lib/rails/acts_as_carlesso.rb".freeze, "lib/rails/helpers/rails_helper.rb".freeze, "lib/ric.rb".freeze, "lib/ric/colors.rb".freeze, "lib/ric/conf.rb".freeze, "lib/ric/debug.rb".freeze, "lib/ric/files.rb".freeze, "lib/ric/html.rb".freeze, "lib/ric/zibaldone.rb".freeze, "lib/ruby_classes/arrays.rb".freeze, "lib/ruby_classes/strings.rb".freeze, "lib/tmp/uniquify.rb".freeze, "rails/init.rb".freeze, "ric.gemspec".freeze, "test/sample_conf.yml".freeze, "test/strings_helper.rb".freeze, "test/test_helper.rb".freeze, "var/www/index.html".freeze]
|
|
17
|
-
s.homepage = "http://github.com/palladius/ric".freeze
|
|
18
|
-
s.licenses = ["MIT".freeze]
|
|
19
|
-
s.rdoc_options = ["--line-numbers".freeze, "--title".freeze, "Ric".freeze, "--main".freeze, "README.md".freeze]
|
|
20
|
-
s.rubygems_version = "3.5.11".freeze
|
|
21
|
-
s.summary = "My first gem with various utilities (colors and tests now). My name is Riccardo, hence 'ric' (ok I admit it, this was just ot prove Im able to build a sentence with hence!)".freeze
|
|
22
|
-
s.test_files = ["test/test_helper.rb".freeze]
|
|
23
|
-
|
|
24
|
-
s.specification_version = 4
|
|
25
|
-
|
|
26
|
-
s.add_development_dependency(%q<echoe>.freeze, [">= 0".freeze])
|
|
27
|
-
end
|
data/test/sample_conf.yml
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
#Creatd by ric.rb:load_auto_conf()
|
|
2
|
-
# TODO test with THIS yaml
|
|
3
|
-
---
|
|
4
|
-
app_name: ric gem test yaml
|
|
5
|
-
conf:
|
|
6
|
-
dryrun: true
|
|
7
|
-
author: Riccardo Carlesso <riccardo.carlesso@gmail.com>
|
|
8
|
-
files:
|
|
9
|
-
- "**/{*.{mp3,jpg}}"
|
|
10
|
-
- README
|
|
11
|
-
- put
|
|
12
|
-
- your
|
|
13
|
-
- files
|
|
14
|
-
- here
|
|
15
|
-
from: ~/git/yaffle_guide/vendor/plugins/ric_admin/
|
|
16
|
-
to: ~/git/ric_admin/
|
|
17
|
-
description: Please put an interesting description HERE for future use!
|
data/test/strings_helper.rb
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
require File.dirname(__FILE__) + '/test_helper'
|
|
2
|
-
|
|
3
|
-
class StringsTest < Test::Unit::TestCase
|
|
4
|
-
|
|
5
|
-
def test_to_squawk_prepends_the_word_squawk
|
|
6
|
-
assert_equal "squawk! Hello World", "Hello World".to_squawk
|
|
7
|
-
end
|
|
8
|
-
def test_qwe_is_created_for_string
|
|
9
|
-
assert_equal "worthless method called 'qwe' for 'Hello World'", "Hello World".qwe
|
|
10
|
-
end
|
|
11
|
-
|
|
12
|
-
def tets_fails
|
|
13
|
-
assert_equal 42,24
|
|
14
|
-
end
|
|
15
|
-
|
|
16
|
-
end
|
|
17
|
-
|
data/test/test_helper.rb
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
require 'rubygems'
|
|
2
|
-
require 'ric'
|
|
3
|
-
require 'test/unit'
|
|
4
|
-
require 'active_support'
|
|
5
|
-
|
|
6
|
-
ENV['RAILS_ENV'] = 'test'
|
|
7
|
-
#ENV['RAILS_ROOT'] ||= File.dirname(__FILE__) + '/../../../..'
|
|
8
|
-
ENV['RAILS_ROOT'] ||= File.dirname(__FILE__) + '/..'
|
|
9
|
-
|
|
10
|
-
ppurple "TEST_HELPER for RIC gem"
|
|
11
|
-
|
|
12
|
-
require 'test/unit'
|
|
13
|
-
#require File.expand_path(File.join(ENV['RAILS_ROOT'], 'config/environment.rb'))
|
|
14
|
-
|
|
15
|
-
#def load_schema
|
|
16
|
-
# config = YAML::load(IO.read(File.dirname(__FILE__) + '/database.yml'))
|
|
17
|
-
# ActiveRecord::Base.logger = Logger.new(File.dirname(__FILE__) + "/debug.log")
|
|
18
|
-
#
|
|
19
|
-
# db_adapter = ENV['DB']
|
|
20
|
-
#
|
|
21
|
-
# # no db passed, try one of these fine config-free DBs before bombing.
|
|
22
|
-
# db_adapter ||=
|
|
23
|
-
# begin
|
|
24
|
-
# require 'rubygems'
|
|
25
|
-
# require 'sqlite'
|
|
26
|
-
# 'sqlite'
|
|
27
|
-
# rescue MissingSourceFile
|
|
28
|
-
# begin
|
|
29
|
-
# require 'sqlite3'
|
|
30
|
-
# 'sqlite3'
|
|
31
|
-
# rescue MissingSourceFile
|
|
32
|
-
# end
|
|
33
|
-
# end
|
|
34
|
-
#
|
|
35
|
-
# if db_adapter.nil?
|
|
36
|
-
# raise "No DB Adapter selected. Pass the DB= option to pick one, or install Sqlite or Sqlite3."
|
|
37
|
-
# end
|
|
38
|
-
#
|
|
39
|
-
# ActiveRecord::Base.establish_connection(config[db_adapter])
|
|
40
|
-
# load(File.dirname(__FILE__) + "/schema.rb")
|
|
41
|
-
# #require File.dirname(__FILE__) + '/../rails/init' rescue nil # if its not ther, no probs (its obsolete!) :)
|
|
42
|
-
#end
|