Skip to content

Commit

Permalink
add version information. #167
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Fenner committed Dec 29, 2018
1 parent 689be81 commit b15fe96
Show file tree
Hide file tree
Showing 15 changed files with 293 additions and 361 deletions.
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ GEM
latex-decode (~> 0.0)
binding_of_caller (0.8.0)
debug_inspector (>= 0.0.1)
bolognese (1.0.32)
bolognese (1.0.33)
activesupport (>= 4.2.5, < 6)
benchmark_methods (~> 0.7)
bibtex-ruby (~> 4.1)
Expand Down
2 changes: 1 addition & 1 deletion app/models/doi.rb
Original file line number Diff line number Diff line change
Expand Up @@ -718,7 +718,7 @@ def save_metadata
def set_defaults
self.is_active = (aasm_state == "findable") ? "\x01" : "\x00"
self.version = version.present? ? version + 1 : 1
self.updated = Time.zone.now.utc.iso8601 if (url_changed? || xml_changed? || content_url_changed? || minted_changed? || aasm_state_changed? || reason_changed?)
self.updated = Time.zone.now.utc.iso8601
end

def self.migrate_landing_page(options={})
Expand Down
5 changes: 5 additions & 0 deletions config/initializers/_version.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module Lupo
class Application
VERSION = "2.1.15"
end
end
2 changes: 2 additions & 0 deletions config/initializers/bugsnag.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,7 @@
Bugsnag.configure do |config|
config.api_key = ENV["BUGSNAG_KEY"]
config.notify_release_stages = %w(stage production)
config.app_version = Lupo::Application::VERSION
configuration.auto_capture_sessions = true
end
end
1 change: 0 additions & 1 deletion spec/concerns/crosscitable_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,6 @@
it "from datacite url" do
string = "https://doi.org/10.7272/q6g15xs4"
meta = subject.parse_xml(string)

expect(meta["from"]).to eq("datacite")
expect(meta["doi"]).to eq("10.7272/q6g15xs4")
expect(meta["creators"].length).to eq(2)
Expand Down
51 changes: 25 additions & 26 deletions spec/fixtures/vcr_cassettes/Doi/parse_xml/from_crossref_url.yml

Large diffs are not rendered by default.

96 changes: 45 additions & 51 deletions spec/fixtures/vcr_cassettes/Doi/parse_xml/from_datacite_url.yml

Large diffs are not rendered by default.

53 changes: 3 additions & 50 deletions spec/fixtures/vcr_cassettes/Doi/parse_xml/from_schema_org_url.yml

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions spec/requests/dois_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -915,6 +915,7 @@
end

it 'returns status code 201' do
puts response.body
expect(response).to have_http_status(201)
end

Expand Down

0 comments on commit b15fe96

Please sign in to comment.