activerecord-jdbcnuodb-adapter 1.0.3 → 1.2

Sign up to get free protection for your applications and to get access to all the features.
data/.travis.yml CHANGED
@@ -6,23 +6,32 @@ rvm:
6
6
  - jruby-19mode
7
7
 
8
8
  env:
9
- - NUODB_ROOT=/opt/nuodb
9
+ - NUODB_HOME=/opt/nuodb CLASSPATH=/opt/nuodb/jar/nuodbjdbc.jar NUODB_VERSION=1.2
10
+ - NUODB_HOME=/opt/nuodb CLASSPATH=/opt/nuodb/jar/nuodbjdbc.jar NUODB_VERSION=1.1.1
11
+ - NUODB_HOME=/opt/nuodb CLASSPATH=/opt/nuodb/jar/nuodbjdbc.jar NUODB_VERSION=1.1
12
+ - NUODB_HOME=/opt/nuodb CLASSPATH=/opt/nuodb/jar/nuodbjdbc.jar NUODB_VERSION=1.0.2
13
+ - NUODB_HOME=/opt/nuodb CLASSPATH=/opt/nuodb/jar/nuodbjdbc.jar NUODB_VERSION=1.0.1
10
14
 
11
15
  notifications:
12
16
  recipients:
13
17
  - buck.robert.j@gmail.com
14
18
  - rbuck@nuodb.com
19
+ - jgetto@nuodb.com
15
20
 
16
- before_script:
17
- - wget http://www.nuodb.com/latest/nuodb-1.0-GA.linux.x86_64.deb --output-document=/var/tmp/nuodb.deb
21
+ before_install:
22
+ - wget http://www.nuodb.com/latest/releases/nuodb-${NUODB_VERSION}.linux.x64.deb --output-document=/var/tmp/nuodb.deb
18
23
  - sudo dpkg -i /var/tmp/nuodb.deb
24
+ - sleep 2
25
+
26
+ before_script:
27
+ - java -jar ${NUODB_HOME}/jar/nuodbmanager.jar --broker localhost --user domain --password bird --command "start process sm database test host localhost archive /var/tmp/nuodb initialize true waitForRunning true"
28
+ - java -jar ${NUODB_HOME}/jar/nuodbmanager.jar --broker localhost --user domain --password bird --command "start process te database test host localhost options '--dba-user dba --dba-password baz' waitForRunning true"
29
+ - echo "create user cloud password 'user';" | ${NUODB_HOME}/bin/nuosql test@localhost --user dba --password baz
19
30
 
20
31
  script:
21
32
  - jruby -S gem update --system
22
33
  - jruby -S bundle install
23
- - jruby -S gem list
24
- - NUODB_ROOT=/opt/nuodb jruby -S bundle exec rake build install
25
- - jruby -S gem list
34
+ - NUODB_ROOT=NUODB_HOME jruby -S rake clean build spec install
26
35
 
27
36
  after_script:
28
37
  - sudo dpkg -r nuodb
@@ -1,53 +1,61 @@
1
- = ActiveRecord JDBC NuoDB Adapter
1
+ # ActiveRecord JDBC NuoDB Adapter
2
2
 
3
- {<img src="https://api.travis-ci.org/nuodb/activerecord-jdbcnuodb-adapter.png?branch=master" alt="Build Status" />}[http://travis-ci.org/nuodb/activerecord-jdbcnuodb-adapter]
4
- {<img src="https://gemnasium.com/nuodb/activerecord-jdbcnuodb-adapter.png?travis" alt="Dependency Status" />}[https://gemnasium.com/nuodb/activerecord-jdbcnuodb-adapter]
5
- {<img src="https://codeclimate.com/github/nuodb/activerecord-jdbcnuodb-adapter.png" />}[https://codeclimate.com/github/nuodb/activerecord-jdbcnuodb-adapter]
3
+ [<img
4
+ src="https://api.travis-ci.org/nuodb/activerecord-jdbcnuodb-adapter.png?branch
5
+ =master" alt="Build Status"
6
+ />](http://travis-ci.org/nuodb/activerecord-jdbcnuodb-adapter) [<img
7
+ src="https://gemnasium.com/nuodb/activerecord-jdbcnuodb-adapter.png?travis"
8
+ alt="Dependency Status"
9
+ />](https://gemnasium.com/nuodb/activerecord-jdbcnuodb-adapter) [<img
10
+ src="https://codeclimate.com/github/nuodb/activerecord-jdbcnuodb-adapter.png"
11
+ />](https://codeclimate.com/github/nuodb/activerecord-jdbcnuodb-adapter)
6
12
 
7
- == DESCRIPTION
13
+ ## DESCRIPTION
8
14
 
9
15
  An ActiveRecord JDBC Adapter for NuoDB.
10
16
 
11
- == Usage
17
+ ## Usage
12
18
 
13
- 1. Include NuoDB information in the database.yml file as:
19
+ 1. Include NuoDB information in the database.yml file as:
14
20
 
15
- development:
16
- adapter: nuodb
17
- database: development
18
- schema: test
19
- username: cloud
20
- password: user
21
+ development:
22
+ adapter: nuodb
23
+ database: development
24
+ schema: test
25
+ username: dba
26
+ password: baz
21
27
 
22
- test:
23
- adapter: nuodb
24
- database: development
25
- schema: test
26
- username: cloud
27
- password: user
28
+ test:
29
+ adapter: nuodb
30
+ database: development
31
+ schema: test
32
+ username: dba
33
+ password: baz
28
34
 
29
- production:
30
- adapter: nuodb
31
- database: development
32
- schema: test
33
- username: cloud
34
- password: user
35
+ production:
36
+ adapter: nuodb
37
+ database: development
38
+ schema: test
39
+ username: dba
40
+ password: baz
35
41
 
36
- 2. In the Gemfile, call the nuodb gem with:
42
+ 2. In the Gemfile, call the nuodb gem with:
37
43
 
38
- jruby -S gem 'activerecord-jdbcnuodb-adapter'
44
+ jruby -S gem 'activerecord-jdbcnuodb-adapter'
39
45
 
40
- 3. Optionally integrate rake db:test tasks (see below).
46
+ 3. Optionally integrate rake db:test tasks (see below).
41
47
 
42
- ===SUPPORTING RAILS DB MIGRATE TASKS
43
48
 
44
- We are making the driver compliant with the rake task interfaces in the :db namespace.
45
- You can now use standard rake tasks for just about everything except for creating the
46
- actual databases.
49
+ ### SUPPORTING RAILS DB MIGRATE TASKS
47
50
 
48
- The only problem is that the rails tasks themselves are not open or extensible in a
49
- manner that a driver can extend. As such there are a few integration points necessary
50
- on the application side of the house; this section details them.
51
+ We are making the driver compliant with the rake task interfaces in the :db
52
+ namespace. You can now use standard rake tasks for just about everything
53
+ except for creating the actual databases.
54
+
55
+ The only problem is that the rails tasks themselves are not open or extensible
56
+ in a manner that a driver can extend. As such there are a few integration
57
+ points necessary on the application side of the house; this section details
58
+ them.
51
59
 
52
60
  Place the following content in your lib/override_task.rb file:
53
61
 
@@ -113,9 +121,9 @@ Then in your lib/tasks/databases.rake script add the following content:
113
121
  With these changes to your Rails application you will be able to run
114
122
  db:test:prepare tasks or similar.
115
123
 
116
- == ENVIRONMENT SETUP
124
+ ## ENVIRONMENT SETUP
117
125
 
118
- === MAC
126
+ ### MAC
119
127
 
120
128
  To set up JRuby on Mac, you may optimally install RVM and use that to install
121
129
  JRuby, or you may also install it from the package installer available online
@@ -123,20 +131,20 @@ which requires additional environment setup.
123
131
 
124
132
  For Mac, run the package installer available at:
125
133
 
126
- http://jruby.org.s3.amazonaws.com/downloads/1.7.2/JRuby-1.7.2.dmg
134
+ http://jruby.org.s3.amazonaws.com/downloads/1.7.2/JRuby-1.7.2.dmg
127
135
 
128
136
  Then update your path so that the Gem from JRuby is first on your path ahead
129
137
  of the system installed ruby:
130
138
 
131
- export PATH=/Library/Frameworks/JRuby.framework/Versions/Current/bin:$PATH
139
+ export PATH=/Library/Frameworks/JRuby.framework/Versions/Current/bin:$PATH
132
140
 
133
- == BUILDING THE GEM
141
+ ## BUILDING THE GEM
134
142
 
135
143
  To compile and test run this command:
136
144
 
137
145
  jruby -S rake clean build rdoc spec
138
146
 
139
- == INSTALLING THE GEM
147
+ ## INSTALLING THE GEM
140
148
 
141
149
  jruby -S gem install activerecord-jdbcnuodb-adapter-1.0.3.gem
142
150
 
@@ -144,7 +152,7 @@ Or from the source tree:
144
152
 
145
153
  jruby -S gem install pkg/activerecord-jdbcnuodb-adapter-1.0.3.gem
146
154
 
147
- == TESTING THE GEM
155
+ ## TESTING THE GEM
148
156
 
149
157
  Start up a minimal chorus as follows:
150
158
 
@@ -155,7 +163,7 @@ Start up a minimal chorus as follows:
155
163
  Create a user in the database:
156
164
 
157
165
  ${NUODB_ROOT}/bin/nuosql test@localhost --user dba --password baz
158
- > create user cloud password 'user';
166
+ > create user dba password 'baz';
159
167
  > exit
160
168
 
161
169
  Run the tests:
@@ -163,49 +171,53 @@ Run the tests:
163
171
  export CLASSPATH=${NUODB_ROOT}/jar/nuodbjdbc.jar
164
172
  jruby -S rake spec
165
173
 
166
- == TRYING THE SAMPLE
174
+ ## TRYING THE SAMPLE
167
175
 
168
- 1. Install the NuoDB gems:
176
+ 1. Install the NuoDB gems:
169
177
 
170
- jruby -S gem install rails
171
- jruby -S gem install jdbc-nuodb-1.0.1.gem
172
- jruby -S gem install activerecord-jdbcnuodb-adapter-1.0.3.gem
178
+ jruby -S gem install rails
179
+ jruby -S gem install jdbc-nuodb-1.2.gem
180
+ jruby -S gem install activerecord-jdbcnuodb-adapter-1.2.gem
173
181
 
174
- 2. Verify the gems are installed:
182
+ 2. Verify the gems are installed:
175
183
 
176
- jruby -S gem list
184
+ jruby -S gem list
177
185
 
178
- 3. Run the sample:
186
+ 3. Run the sample:
179
187
 
180
- export CLASSPATH=/path/to/nuodb/jar/nuodbjdbc.jar
181
- jruby samples/sample.rb
188
+ export CLASSPATH=/path/to/nuodb/jar/nuodbjdbc.jar
189
+ jruby samples/sample.rb
182
190
 
183
- == PUBLISHING THE GEM
184
191
 
185
- === TAGGING
192
+ ## PUBLISHING THE GEM
186
193
 
187
- Tag the product using tags per the SemVer specification; our tags have a v-prefix:
194
+ ### TAGGING
188
195
 
189
- git tag -a v1.0.3 -m "SemVer Version: v1.0.3"
196
+ Tag the product using tags per the SemVer specification; our tags have a
197
+ v-prefix:
198
+
199
+ git tag -a v1.2 -m "SemVer Version: v1.2"
190
200
  git push --tags
191
201
 
192
202
  If you make a mistake, take it back quickly:
193
203
 
194
- git tag -d v1.0.3
204
+ git tag -d v1.2
195
205
  git push origin :refs/tags/v1.0.3
196
206
 
197
- ===PUBLISHING
207
+ ### PUBLISHING
198
208
 
199
209
  Here are the commands used to publish:
200
210
 
201
- gem push pkg/activerecord-jdbcnuodb-adapter-1.0.3.gem
211
+ jruby -S gem push pkg/activerecord-jdbcnuodb-adapter-1.2.gem
212
+
213
+ ## INSPECTING THE GEM
202
214
 
203
- == INSPECTING THE GEM
215
+ It is often useful to inspect the contents of a Gem before distribution. To do
216
+ this you dump the contents of a gem thus:
204
217
 
205
- It is often useful to inspect the contents of a Gem before distribution.
206
- To do this you dump the contents of a gem thus:
218
+ gem unpack pkg/activerecord-jdbcnuodb-adapter-1.2.gem
207
219
 
208
- gem unpack pkg/activerecord-jdbcnuodb-adapter-1.0.3.gem
220
+ ## REFERENCES
209
221
 
210
- == REFERENCES
222
+ [![githalytics.com alpha](https://cruel-carlota.pagodabox.com/74e4ed41ce2e3147bdd475979e32e309 "githalytics.com")](http://githalytics.com/nuodb/activerecord-jdbcnuodb-adapter)
211
223
 
@@ -16,13 +16,12 @@ Gem::Specification.new do |spec|
16
16
 
17
17
  spec.require_paths = %w[lib]
18
18
  spec.rdoc_options = %w(--charset=UTF-8)
19
- spec.extra_rdoc_files = %w[README.rdoc LICENSE]
20
19
 
21
20
  spec.files = `git ls-files`.split($\)
22
21
 
23
22
  spec.test_files = spec.files.select { |path| path =~ /^test\/.*test.*\.rb/ }
24
23
 
25
- spec.add_dependency 'jdbc-nuodb', '~> 1.0.1'
24
+ spec.add_dependency 'jdbc-nuodb', '~> 1.2'
26
25
  spec.add_dependency 'activerecord-jdbc-adapter', '>= 1.0.0'
27
26
 
28
27
  %w(rake).each { |gem| spec.add_development_dependency gem }
@@ -1,5 +1,5 @@
1
1
  module ArJdbc
2
2
  module NuoDB
3
- VERSION = '1.0.3'
3
+ VERSION = '1.2'
4
4
  end
5
5
  end
@@ -229,11 +229,11 @@ module ::ArJdbc
229
229
  end
230
230
 
231
231
  def rename_column(table_name, column_name, new_column_name)
232
- raise NotImplementedError, "rename_column is not implemented"
232
+ raise NotImplementedError, 'rename_column is not implemented'
233
233
  end
234
234
 
235
235
  def rename_table(table_name, new_name)
236
- raise NotImplementedError, "rename_table is not implemented"
236
+ raise NotImplementedError, 'rename_table is not implemented'
237
237
  end
238
238
 
239
239
  def recreate_database(name, options = {}) #:nodoc:
@@ -242,19 +242,19 @@ module ::ArJdbc
242
242
  end
243
243
 
244
244
  def create_database(name, options = {}) #:nodoc:
245
- puts "create_database"
245
+ $stderr.puts 'create_database is not implemented'
246
246
  end
247
247
 
248
248
  def drop_database(name) #:nodoc:
249
- puts "drop_database"
249
+ $stderr.puts 'drop_database is not implemented'
250
250
  end
251
251
 
252
252
  # DATABASE STATEMENTS ====================================================
253
253
 
254
254
  LOST_CONNECTION_ERROR_MESSAGES = [
255
- "End of stream reached",
256
- "Broken pipe",
257
- "Connection reset"
255
+ 'End of stream reached',
256
+ 'Broken pipe',
257
+ 'Connection reset'
258
258
  ]
259
259
 
260
260
  # Monkey patch the execute method as reconnect is broken in the underlying
@@ -22,8 +22,8 @@ describe ActiveRecord::ConnectionAdapters::NuoDBAdapter do
22
22
  ActiveRecord::Base.establish_connection(
23
23
  :adapter => 'nuodb',
24
24
  :database => 'test',
25
- :username => 'cloud',
26
- :password => 'user'
25
+ :username => 'dba',
26
+ :password => 'baz'
27
27
  )
28
28
 
29
29
  ActiveRecord::Schema.define do
metadata CHANGED
@@ -1,7 +1,8 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activerecord-jdbcnuodb-adapter
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.3
4
+ version: '1.2'
5
+ prerelease:
5
6
  platform: ruby
6
7
  authors:
7
8
  - Robert Buck
@@ -9,7 +10,7 @@ authors:
9
10
  autorequire:
10
11
  bindir: bin
11
12
  cert_chain: []
12
- date: 2013-03-18 00:00:00.000000000 Z
13
+ date: 2013-09-25 00:00:00.000000000 Z
13
14
  dependencies:
14
15
  - !ruby/object:Gem::Dependency
15
16
  name: jdbc-nuodb
@@ -17,12 +18,14 @@ dependencies:
17
18
  requirements:
18
19
  - - "~>"
19
20
  - !ruby/object:Gem::Version
20
- version: 1.0.1
21
+ version: '1.2'
22
+ none: false
21
23
  requirement: !ruby/object:Gem::Requirement
22
24
  requirements:
23
25
  - - "~>"
24
26
  - !ruby/object:Gem::Version
25
- version: 1.0.1
27
+ version: '1.2'
28
+ none: false
26
29
  prerelease: false
27
30
  type: :runtime
28
31
  - !ruby/object:Gem::Dependency
@@ -32,11 +35,13 @@ dependencies:
32
35
  - - ">="
33
36
  - !ruby/object:Gem::Version
34
37
  version: 1.0.0
38
+ none: false
35
39
  requirement: !ruby/object:Gem::Requirement
36
40
  requirements:
37
41
  - - ">="
38
42
  - !ruby/object:Gem::Version
39
43
  version: 1.0.0
44
+ none: false
40
45
  prerelease: false
41
46
  type: :runtime
42
47
  - !ruby/object:Gem::Dependency
@@ -45,12 +50,16 @@ dependencies:
45
50
  requirements:
46
51
  - - ">="
47
52
  - !ruby/object:Gem::Version
48
- version: '0'
53
+ version: !binary |-
54
+ MA==
55
+ none: false
49
56
  requirement: !ruby/object:Gem::Requirement
50
57
  requirements:
51
58
  - - ">="
52
59
  - !ruby/object:Gem::Version
53
- version: '0'
60
+ version: !binary |-
61
+ MA==
62
+ none: false
54
63
  prerelease: false
55
64
  type: :development
56
65
  - !ruby/object:Gem::Dependency
@@ -60,11 +69,13 @@ dependencies:
60
69
  - - "~>"
61
70
  - !ruby/object:Gem::Version
62
71
  version: 2.11.0
72
+ none: false
63
73
  requirement: !ruby/object:Gem::Requirement
64
74
  requirements:
65
75
  - - "~>"
66
76
  - !ruby/object:Gem::Version
67
77
  version: 2.11.0
78
+ none: false
68
79
  prerelease: false
69
80
  type: :development
70
81
  - !ruby/object:Gem::Dependency
@@ -74,11 +85,13 @@ dependencies:
74
85
  - - "~>"
75
86
  - !ruby/object:Gem::Version
76
87
  version: 2.11.0
88
+ none: false
77
89
  requirement: !ruby/object:Gem::Requirement
78
90
  requirements:
79
91
  - - "~>"
80
92
  - !ruby/object:Gem::Version
81
93
  version: 2.11.0
94
+ none: false
82
95
  prerelease: false
83
96
  type: :development
84
97
  - !ruby/object:Gem::Dependency
@@ -88,11 +101,13 @@ dependencies:
88
101
  - - "~>"
89
102
  - !ruby/object:Gem::Version
90
103
  version: 2.11.0
104
+ none: false
91
105
  requirement: !ruby/object:Gem::Requirement
92
106
  requirements:
93
107
  - - "~>"
94
108
  - !ruby/object:Gem::Version
95
109
  version: 2.11.0
110
+ none: false
96
111
  prerelease: false
97
112
  type: :development
98
113
  - !ruby/object:Gem::Dependency
@@ -102,26 +117,26 @@ dependencies:
102
117
  - - "~>"
103
118
  - !ruby/object:Gem::Version
104
119
  version: 2.11.0
120
+ none: false
105
121
  requirement: !ruby/object:Gem::Requirement
106
122
  requirements:
107
123
  - - "~>"
108
124
  - !ruby/object:Gem::Version
109
125
  version: 2.11.0
126
+ none: false
110
127
  prerelease: false
111
128
  type: :development
112
129
  description: ActiveRecord adapter for NuoDB. Only for use with JRuby. Requires separate Cache JDBC driver.
113
130
  email: rbuck@nuodb.com
114
131
  executables: []
115
132
  extensions: []
116
- extra_rdoc_files:
117
- - README.rdoc
118
- - LICENSE
133
+ extra_rdoc_files: []
119
134
  files:
120
135
  - ".gitignore"
121
136
  - ".travis.yml"
122
137
  - Gemfile
123
138
  - LICENSE
124
- - README.rdoc
139
+ - README.md
125
140
  - Rakefile
126
141
  - activerecord-jdbcnuodb-adapter.gemspec
127
142
  - lib/active_record/connection_adapters/jdbcnuodb_adapter.rb
@@ -147,7 +162,6 @@ files:
147
162
  homepage: http://jruby-extras.rubyforge.org/activerecord-jdbc-adapter
148
163
  licenses:
149
164
  - BSD
150
- metadata: {}
151
165
  post_install_message:
152
166
  rdoc_options:
153
167
  - "--charset=UTF-8"
@@ -157,16 +171,19 @@ required_ruby_version: !ruby/object:Gem::Requirement
157
171
  requirements:
158
172
  - - ">="
159
173
  - !ruby/object:Gem::Version
160
- version: '0'
174
+ version: !binary |-
175
+ MA==
176
+ none: false
161
177
  required_rubygems_version: !ruby/object:Gem::Requirement
162
178
  requirements:
163
179
  - - !binary |-
164
180
  Pg==
165
181
  - !ruby/object:Gem::Version
166
182
  version: 1.3.1
183
+ none: false
167
184
  requirements: []
168
185
  rubyforge_project:
169
- rubygems_version: 2.0.3
186
+ rubygems_version: 1.8.24
170
187
  signing_key:
171
188
  specification_version: 3
172
189
  summary: ActiveRecord adapter for NuoDB.
checksums.yaml DELETED
@@ -1,15 +0,0 @@
1
- ---
2
- SHA1:
3
- metadata.gz: !binary |-
4
- MWEzZGEzNTljYjZiNTIzZWI5NDkxMmFhMTlhNmU2ODU1Njg0ODhmYQ==
5
- data.tar.gz: !binary |-
6
- MTY0NDY4Yzg1YzI1YjA1NGJkZTIzMzA3ODcxYTMxMzI0MWE5YjA4Zg==
7
- SHA512:
8
- metadata.gz: !binary |-
9
- MTM1Y2YxMzllNDYwZTRlMWVlN2YzOWQ2NzVjODgxZTQyYTc2MjFkZTkzOGM1
10
- YWU5NDYwNzM4OWJjODgzMDJiMzMxMGQ2NjlmZGViMGIwODk4Mjg2NTdmZTg0
11
- NDY3NGE5ZTA5NTdiOGE2NTBhYjUzMDlhZDNlNmEzN2RmNmYxMTU=
12
- data.tar.gz: !binary |-
13
- OGFjMTUxODYyN2RiNzgxMGEyMmJiOWZjMTc1NTNlMGIwNWE2Mjg0MzFiODRl
14
- NjJjM2Y2Y2VhOWI1NDQ4ZDg5NmE3NTU5N2U2MTNmMDU2MDI1YjE4YmVmNjBk
15
- MWIwNjBiMWE0ODFkNGRkY2MyNDcxZjc4OTg0Nzk0MDBkMjYyNDI=