artk 0.0.1 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +40 -11
- data/app/models/artk/accession.rb +3 -1
- data/app/models/artk/base.rb +6 -0
- data/app/models/artk/component.rb +1 -1
- data/app/models/artk/resource.rb +1 -1
- data/lib/artk/version.rb +1 -1
- metadata +7 -7
- data/config/initializers/at_connect.rb +0 -11
data/README.md
CHANGED
@@ -38,17 +38,46 @@ And then add the engine to your application
|
|
38
38
|
|
39
39
|
mount Artk::Engine => '/artk'
|
40
40
|
|
41
|
-
Configure the gem to connect to your database by
|
42
|
-
|
43
|
-
|
44
|
-
:
|
45
|
-
:
|
46
|
-
:
|
47
|
-
:
|
48
|
-
:
|
49
|
-
:
|
50
|
-
|
51
|
-
|
41
|
+
Configure the gem to connect to your Archivists' Toolkit database by editing `config/database.yml` and adding these lines:
|
42
|
+
|
43
|
+
artk_development:
|
44
|
+
adapter: mysql2
|
45
|
+
encoding: utf8
|
46
|
+
reconnect: false
|
47
|
+
database: atk
|
48
|
+
pool: 5
|
49
|
+
username: root
|
50
|
+
password: password
|
51
|
+
host: localhost
|
52
|
+
|
53
|
+
artk_test:
|
54
|
+
adapter: mysql2
|
55
|
+
encoding: utf8
|
56
|
+
reconnect: false
|
57
|
+
database: bl_test
|
58
|
+
pool: 5
|
59
|
+
username: root
|
60
|
+
password: password
|
61
|
+
host: localhost
|
62
|
+
|
63
|
+
artk_production:
|
64
|
+
adapter: mysql2
|
65
|
+
encoding: utf8
|
66
|
+
reconnect: false
|
67
|
+
database: bl_prod
|
68
|
+
pool: 5
|
69
|
+
username: root
|
70
|
+
password: password
|
71
|
+
host: localhost
|
72
|
+
|
73
|
+
The above configuration is for Mysql, so your adapater may vary, and you'll need to change these username,
|
74
|
+
password, and host values to match your environment. Using this configuration allows you to keep your databases
|
75
|
+
separate. For example, the Rails database for your application would be defined by the `developement` yaml
|
76
|
+
value, while the Archivists' Toolkit database by the `artk_development` yaml value, and so forth with the other
|
77
|
+
environments.
|
78
|
+
|
79
|
+
To be safe, you might want to use a username for the Toolkit connection that has only SELECT rights,
|
80
|
+
and avoid any possibility of the Rails application trying to make changes to the wrong database.
|
52
81
|
|
53
82
|
## Contributing
|
54
83
|
|
data/app/models/artk/resource.rb
CHANGED
data/lib/artk/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: artk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-10-
|
12
|
+
date: 2013-10-17 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
@@ -44,7 +44,7 @@ dependencies:
|
|
44
44
|
- !ruby/object:Gem::Version
|
45
45
|
version: '0'
|
46
46
|
- !ruby/object:Gem::Dependency
|
47
|
-
name:
|
47
|
+
name: mysql2
|
48
48
|
requirement: !ruby/object:Gem::Requirement
|
49
49
|
none: false
|
50
50
|
requirements:
|
@@ -60,7 +60,7 @@ dependencies:
|
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: '0'
|
62
62
|
- !ruby/object:Gem::Dependency
|
63
|
-
name:
|
63
|
+
name: rspec-rails
|
64
64
|
requirement: !ruby/object:Gem::Requirement
|
65
65
|
none: false
|
66
66
|
requirements:
|
@@ -106,10 +106,10 @@ files:
|
|
106
106
|
- app/controllers/artk/resources_controller.rb
|
107
107
|
- app/helpers/artk/application_helper.rb
|
108
108
|
- app/models/artk/accession.rb
|
109
|
+
- app/models/artk/base.rb
|
109
110
|
- app/models/artk/component.rb
|
110
111
|
- app/models/artk/resource.rb
|
111
112
|
- app/views/layouts/artk/application.html.erb
|
112
|
-
- config/initializers/at_connect.rb
|
113
113
|
- config/routes.rb
|
114
114
|
- lib/artk/engine.rb
|
115
115
|
- lib/artk/version.rb
|
@@ -133,7 +133,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
133
133
|
version: '0'
|
134
134
|
segments:
|
135
135
|
- 0
|
136
|
-
hash:
|
136
|
+
hash: 4392052325810986348
|
137
137
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
138
138
|
none: false
|
139
139
|
requirements:
|
@@ -142,7 +142,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
142
142
|
version: '0'
|
143
143
|
segments:
|
144
144
|
- 0
|
145
|
-
hash:
|
145
|
+
hash: 4392052325810986348
|
146
146
|
requirements: []
|
147
147
|
rubyforge_project:
|
148
148
|
rubygems_version: 1.8.23
|
@@ -1,11 +0,0 @@
|
|
1
|
-
# sample connection configuration. Rename to at_connect.rb
|
2
|
-
#
|
3
|
-
# We override ActiveRecord to connect to our AT Database
|
4
|
-
ActiveRecord::Base.establish_connection(
|
5
|
-
:adapter => 'mysql2',
|
6
|
-
:encoding => 'utf8',
|
7
|
-
:database => 'atk',
|
8
|
-
:host => 'localhost',
|
9
|
-
:username => 'root',
|
10
|
-
:password => 'password'
|
11
|
-
)
|