Skip to content
This repository has been archived by the owner on May 14, 2022. It is now read-only.

#Issue 66 - OK to merge #67

Merged
merged 3 commits into from
Aug 18, 2016
Merged

#Issue 66 - OK to merge #67

merged 3 commits into from
Aug 18, 2016

Conversation

sdellis
Copy link
Member

@sdellis sdellis commented Jul 26, 2016

@kevinreiss Is this along the lines of what you were thinking? (Still need to write the tests for this and allow URLs to be managed through a config file.)

@coveralls
Copy link

Coverage Status

Coverage decreased (-22.4%) to 77.557% when pulling 2bca8c3 on issue-66 into 8e8c9b4 on development.

1 similar comment
@coveralls
Copy link

Coverage Status

Coverage decreased (-22.4%) to 77.557% when pulling 2bca8c3 on issue-66 into 8e8c9b4 on development.

lib = get_lib(holding_location.locations_library_id)
if lib.code == 'firestone'
@@locator_url + "loc=" + @params[:loc]+ "&id=" + @params[:id]
else
Copy link
Member

@kevinreiss kevinreiss Jul 26, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The old voyager system is hardcoded to provide a link to a map for every item regardless of location. In OL we only show the map link for accessible locations. Given that the else clause here should probably redirect you to something useful for the ID like the request system page for the material. The elseif clause can check to see if the location is in a stackmapable library. The fallback else statement can send the user to https://pulsearch.princeton.edu/requests/{bib_id}.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, yes, there are three scenarios. So, is a holding Location considered accessible if it's "open"? (i.e., holding_location.open)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, in theory all the locations in off-site facilities and closed stack locations should have that flag return false.

Copy link
Member

@kevinreiss kevinreiss Jul 26, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might be a few exceptions. Some Marquand locations are technically "accessible" to users but are not flagged as open because it is a non-circulating library. I think the toggle value to use here is just what library the location supplied is attached to.

@coveralls
Copy link

coveralls commented Jul 27, 2016

Coverage Status

Coverage decreased (-7.9%) to 92.089% when pulling 1fc3aee on issue-66 into 8e8c9b4 on development.

def index
@map = Map.new(map_params)

if !@map.url.nil?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The logic here feels a little confusing, and violates law of demeter. What's really being checked here? If the map is valid? Can that be extracted to unless @map.valid?

@coveralls
Copy link

coveralls commented Jul 28, 2016

Coverage Status

Coverage decreased (-5.4%) to 94.562% when pulling 8911b49 on issue-66 into 8e8c9b4 on development.

@coveralls
Copy link

coveralls commented Jul 28, 2016

Coverage Status

Coverage decreased (-7.2%) to 92.814% when pulling ef3183c on issue-66 into 8e8c9b4 on development.

@@locator_url = "http://library.princeton.edu/locator/index.php?"
@@stackmap_url = "http://princeton.stackmap.com/view/?"
@params = params
@holding_location = set_holding_location(@params[:loc])

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

More typical ruby-ism would be

self.holding_location = params[:loc]

@coveralls
Copy link

coveralls commented Jul 28, 2016

Coverage Status

Coverage decreased (-6.9%) to 93.093% when pulling 5a9ded7 on issue-66 into 8e8c9b4 on development.

end

def url
if @valid

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not just use the is_valid method and not actually set @Valid?

@coveralls
Copy link

Coverage Status

Coverage decreased (-2.2%) to 97.84% when pulling 6d8004e on issue-66 into 8e8c9b4 on development.

@coveralls
Copy link

coveralls commented Jul 29, 2016

Coverage Status

Coverage decreased (-2.2%) to 97.84% when pulling 421584b on issue-66 into 8e8c9b4 on development.

@coveralls
Copy link

coveralls commented Jul 29, 2016

Coverage Status

Coverage decreased (-1.9%) to 98.137% when pulling a99bfd3 on issue-66 into 8e8c9b4 on development.

@coveralls
Copy link

coveralls commented Jul 29, 2016

Coverage Status

Coverage decreased (-0.3%) to 99.689% when pulling 515240a on issue-66 into 8e8c9b4 on development.

@coveralls
Copy link

coveralls commented Jul 29, 2016

Coverage Status

Coverage decreased (-1.2%) to 98.817% when pulling 88fadc6 on issue-66 into 8e8c9b4 on development.

@coveralls
Copy link

coveralls commented Aug 11, 2016

Coverage Status

Coverage decreased (-0.6%) to 99.408% when pulling d6624cd on issue-66 into 8e8c9b4 on development.

callno = self.bibrec['call_number_display'].first
end
URI.encode(@stackmap_url + "callno=" + callno + "&location=" + self.loc + "&library=" + self.lib.label)
else
Copy link
Member

@kevinreiss kevinreiss Aug 11, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sdellis I don't see a test for the reserves use case. Sorry if I missed it. I think adding this would make coveralls happy.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.3%) to 99.706% when pulling 247d91c on issue-66 into 8e8c9b4 on development.

@coveralls
Copy link

coveralls commented Aug 12, 2016

Coverage Status

Coverage remained the same at 100.0% when pulling 7d4998a on issue-66 into 8e8c9b4 on development.

@sdellis sdellis changed the title WIP, Do Not Merge! #Issue 66 #Issue 66 - OK to merge Aug 12, 2016
@coveralls
Copy link

coveralls commented Aug 12, 2016

Coverage Status

Coverage remained the same at 100.0% when pulling bbdfd34 on issue-66 into 8e8c9b4 on development.

@coveralls
Copy link

coveralls commented Aug 12, 2016

Coverage Status

Coverage decreased (-0.6%) to 99.413% when pulling c9f5a10 on issue-66 into 8e8c9b4 on development.

@coveralls
Copy link

coveralls commented Aug 12, 2016

Coverage Status

Coverage decreased (-0.6%) to 99.413% when pulling c9f5a10 on issue-66 into 8e8c9b4 on development.

@tampakis
Copy link
Contributor

Looks good to me, just need to get coverage to 💯

@coveralls
Copy link

coveralls commented Aug 17, 2016

Coverage Status

Coverage decreased (-0.6%) to 99.413% when pulling e936d95 on issue-66 into 8e8c9b4 on development.

@coveralls
Copy link

coveralls commented Aug 17, 2016

Coverage Status

Coverage remained the same at 100.0% when pulling f899fbe on issue-66 into 8e8c9b4 on development.

@eliotjordan
Copy link
Member

eliotjordan commented Aug 17, 2016

Pushed a few commits to this branch.

  • The map model needed refactoring. In particular, the use of the self scope is not appropriate with instance methods and variables.
  • Map controller spec was DRYed up.
  • Added test for hours location. Coverage now 💯
  • Map route converted to a resourceful route.
  • Commit message streamlined.

@eliotjordan
Copy link
Member

Closes issue #66.

@jpstroop
Copy link
Member

👍 nice

@kevinreiss kevinreiss merged commit 9e9194c into development Aug 18, 2016
@kevinreiss kevinreiss deleted the issue-66 branch August 18, 2016 13:46
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants