orcid 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3e40e9249310d879d3d682f31e4ff96c8ddebd5c
4
- data.tar.gz: c576d7845d3739142beecfdc6f828255129a9efb
3
+ metadata.gz: 72fe44a31b834e45dc65efebc06f416ec6452908
4
+ data.tar.gz: 93a589d4b5992b70e1ca685f1b50b37b9695efe6
5
5
  SHA512:
6
- metadata.gz: cde6825fe3b611118f56bfc83195794bba75763d57f5d97c2c7f254c0e792db97cd1d6384a1b3c79a61e77a0718df64bde9ddb2e72ddde4d56b1bd2eaa0881c6
7
- data.tar.gz: 585614520c7665086f36831ac18dd219693d02ae066bdf5b93e8f397780999503e90c4493eaaa20078ec762959ae8ce7bbebd2613f0c56e25b859d9a360c1a95
6
+ metadata.gz: c8ce12e869d4935a7e7c563a2b760630a42b8139d3f1fbe8c0d73a66b05d00b4b8be6a7ad1ee97b6baf8744be2606bd39cadf00b7d33c63155c0be9ef77935be
7
+ data.tar.gz: 04a0d325084d3023aefc595abefe659ce126e57a81aae12d62949c308eec60a00c02bedbee72ccc9e7077795c1084f21ea9a0360adaf0767007ea5892efb6fdb
data/README.md CHANGED
@@ -60,6 +60,8 @@ if defined?(Orcid)
60
60
  end
61
61
  ```
62
62
 
63
+ **To customize the labels, review the `./config/locales/orcid.en.yml` file.**
64
+
63
65
  ## Registering for an ORCID application profile
64
66
 
65
67
  Your application which will interface with ORCID must be registered with ORCID. Note that you will want to register your production
@@ -4,6 +4,7 @@ module Orcid
4
4
  class ProfileConnection
5
5
  include Virtus.model
6
6
  include ActiveModel::Validations
7
+ include ActiveModel::Conversion
7
8
  extend ActiveModel::Naming
8
9
 
9
10
  class_attribute :available_query_attribute_names
@@ -1,14 +1,22 @@
1
1
  <% profile_connection = Orcid::ProfileConnection.new %>
2
- <p><br />
3
- <%= link_to "Look up your existing ORCID", orcid.new_profile_connection_path(profile_connection:{text: default_search_text}) %>
4
- <span>-OR-</span>
5
- <%= link_to "Create an ORCID", orcid.new_profile_request_path %>
6
- </p>
7
- <p>-OR-</p>
8
- <%= simple_form_for(profile_connection, as: :profile_connection, url: orcid.profile_connections_path, method: :post) do |f| %>
9
- <%= f.input :orcid_profile_id, label: "Enter your existing ORCID (####-####-####-####)", class:"orcid-input" %>
2
+ <% default_search_text = '' unless defined?(default_search_text) %>
3
+ <div class='orcid-connector'>
4
+ <h3><i class="icon-user"></i> <%= link_to t('orcid.verbose_name'), 'http://orcid.org/' %></h3>
5
+ <p>
6
+ <%= link_to t('orcid/profile_connection.look_up_your_existing_orcid', scope: 'helpers.label'), orcid.new_profile_connection_path(profile_connection:{text: default_search_text}) %>
7
+ </p>
8
+ <p>
9
+ <%= link_to t('orcid/profile_connection.create_an_orcid', scope: 'helpers.label'), orcid.new_profile_request_path %>
10
+ </p>
11
+ <p>
12
+ <%= form_for(profile_connection, as: :profile_connection, url: orcid.profile_connections_path, method: :post) do |f| %>
13
+ <%# Note the `scope: 'helpers.label'` option is the default for the label, but I want to call those specifically out %>
14
+ <%= f.label :orcid_profile_id, value: t('orcid/profile_connection.connect_button_text', scope: 'helpers.label') %>
15
+ <%= f.text_field :orcid_profile_id, class:"orcid-input" %>
10
16
  <button type="submit" class="search-submit btn btn-primary" id="keyword-search-submit" tabindex="2">
11
- <span class="orcid-connect">Connect</span>
17
+ <span class="orcid-connect"><%= t('orcid/profile_connection.connect_button_text', scope: 'helpers.label') %></span>
12
18
  </button>
13
- <% end %>
19
+ <% end %>
20
+ </p>
21
+ </div>
14
22
 
@@ -29,4 +29,12 @@ en:
29
29
  connections:
30
30
  messages:
31
31
  profile_connection_not_found: "Unable to find an existing Orcid Profile connection."
32
- verified_profile_connection_exists: "You have already connected and verified your Orcid Profile (%{orcid_profile_id})."
32
+ verified_profile_connection_exists: "You have already connected and verified your Orcid Profile (%{orcid_profile_id})."
33
+ verbose_name: Open Researcher and Contributor ID (ORCID)'
34
+ helpers:
35
+ label:
36
+ orcid/profile_connection:
37
+ orcid_profile_id: "Enter your existing ORCID (####-####-####-####)"
38
+ create_an_orcid: Create an ORCID
39
+ look_up_your_existing_orcid: Look up your existing ORCID
40
+ connect_button_text: Connect
data/lib/orcid/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Orcid
2
- VERSION = '0.1.0'
2
+ VERSION = '0.1.1'
3
3
  end
data/orcid.gemspec CHANGED
@@ -34,7 +34,6 @@ Gem::Specification.new do |s|
34
34
  s.add_dependency 'virtus'
35
35
  s.add_dependency 'email_validator'
36
36
  s.add_dependency 'simple_form'
37
- s.add_dependency 'byebug'
38
37
 
39
38
  s.add_development_dependency 'sqlite3'
40
39
  s.add_development_dependency 'engine_cart'
@@ -13,6 +13,7 @@ module Orcid
13
13
  }
14
14
 
15
15
  its(:email) { should eq email }
16
+ its(:to_model) { should eq subject }
16
17
  its(:user) { should eq user }
17
18
  its(:persisted?) { should eq false }
18
19
  its(:orcid_profile_id) { should be_nil }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: orcid
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeremy Friesen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-05-06 00:00:00.000000000 Z
11
+ date: 2014-05-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -122,20 +122,6 @@ dependencies:
122
122
  - - '>='
123
123
  - !ruby/object:Gem::Version
124
124
  version: '0'
125
- - !ruby/object:Gem::Dependency
126
- name: byebug
127
- requirement: !ruby/object:Gem::Requirement
128
- requirements:
129
- - - '>='
130
- - !ruby/object:Gem::Version
131
- version: '0'
132
- type: :runtime
133
- prerelease: false
134
- version_requirements: !ruby/object:Gem::Requirement
135
- requirements:
136
- - - '>='
137
- - !ruby/object:Gem::Version
138
- version: '0'
139
125
  - !ruby/object:Gem::Dependency
140
126
  name: sqlite3
141
127
  requirement: !ruby/object:Gem::Requirement