museum 0.5.3 → 0.5.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +1 -0
- data/README.md +68 -9
- data/VERSION +1 -1
- data/app/views/museum/cases/index.html.haml +7 -2
- data/app/views/museum/cases/show.html.haml +14 -4
- data/lib/generators/museum/install/install_generator.rb +1 -1
- data/museum.gemspec +7 -3
- data/spec/dummy/app/assets/stylesheets/application.scss +56 -0
- data/spec/dummy/app/views/layouts/application.html.haml +3 -1
- data/spec/dummy/config/initializers/assets.rb +4 -1
- data/spec/dummy/db/development.sqlite3 +0 -0
- metadata +17 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1bcdfd2b1789b7436ee0d0b0a2c70f084e5dafe6
|
4
|
+
data.tar.gz: 5e29c1735e759122a8b8ce218d8319bd0cd1dd1b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6d90b7485a57a8539365d5037f6012c7316ff245dd8cc595228cf880b31d4a05bf8adb92a50c94972ef1dd328c9a624068066e93252308d2e406c64bc1acf541
|
7
|
+
data.tar.gz: d2d53d23186096daf560b9f6c97872f6c81530ed323e7fa5f324c1429bf7cfe18f1ce0778cb75ba3d464d77470001eaf89de075279790493d15f26e1f2f2d9a8
|
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -1,5 +1,4 @@
|
|
1
|
-
Museum
|
2
|
-
===========
|
1
|
+
# Museum
|
3
2
|
|
4
3
|
**Updated for Rails 5**
|
5
4
|
|
@@ -9,8 +8,13 @@ Museum
|
|
9
8
|
|
10
9
|
For organizations that want to market a gem with the latest updates, Museum syncs your gems' data via arbitrary APIs so that your software marketing website stays up to date with the latest information about your gems.
|
11
10
|
|
12
|
-
|
13
|
-
|
11
|
+
### Index Page
|
12
|
+
![Index Page Screenshot](http://gemvein.com/assets/screenshots/museum-cases-index.png)
|
13
|
+
|
14
|
+
### Show Page
|
15
|
+
![Show Page Screenshot](http://gemvein.com/assets/screenshots/museum-cases-show.png)
|
16
|
+
|
17
|
+
## Installation
|
14
18
|
|
15
19
|
First, add the gem to your Gemfile
|
16
20
|
|
@@ -24,8 +28,64 @@ Next, run the following commands
|
|
24
28
|
|
25
29
|
How you edit your database is up to you, but RailsAdmin is my favorite.
|
26
30
|
|
27
|
-
|
28
|
-
|
31
|
+
## See Museum in Action
|
32
|
+
[Gem Vein](http://www.gemvein.com) is a good example of a site whose information about software is kept fresh with Museum.
|
33
|
+
|
34
|
+
## What You Can Do
|
35
|
+
|
36
|
+
To copy the default views to your app directory:
|
37
|
+
|
38
|
+
> rails g museum:views
|
39
|
+
|
40
|
+
### Cases
|
41
|
+
|
42
|
+
These are the gems whose information you wish to keep fresh.
|
43
|
+
|
44
|
+
Create some instances of `Museum::Case` with the `name` of the gem and optionally, a human-readable `title`.
|
45
|
+
|
46
|
+
Museum::Case.new(
|
47
|
+
name: 'bootswitch',
|
48
|
+
title: 'Bootswitch'
|
49
|
+
)
|
50
|
+
Museum::Case.new(
|
51
|
+
name: 'customizable_bootstrap',
|
52
|
+
title: 'Customizable Bootstrap'
|
53
|
+
)
|
54
|
+
Museum::Case.new(
|
55
|
+
name: 'bootstrap_leather',
|
56
|
+
title: 'Bootstrap Leather'
|
57
|
+
)
|
58
|
+
|
59
|
+
### Loupes
|
60
|
+
|
61
|
+
These are the APIs containing information about your gems.
|
62
|
+
|
63
|
+
Museum::Loupe.new(
|
64
|
+
title: 'RubyGems',
|
65
|
+
uri_template: 'https://www.rubygems.org/api/v1/gems/%{name}.json',
|
66
|
+
data_format: 'json'
|
67
|
+
)
|
68
|
+
Museum::Loupe.new(
|
69
|
+
title: 'GitHub',
|
70
|
+
uri_template: 'https://api.github.com/repos/%{user}/%{name}',
|
71
|
+
data_format: 'json'
|
72
|
+
)
|
73
|
+
Museum::Loupe.new(
|
74
|
+
title: 'GitHub README',
|
75
|
+
uri_template: 'https://api.github.com/repos/%{user}/%{name}/readme',
|
76
|
+
data_format: 'json'
|
77
|
+
)
|
78
|
+
|
79
|
+
### Case Details
|
80
|
+
This is where Museum stores the data it retrieves with Loupes. To access them, try something like:
|
81
|
+
|
82
|
+
# In your controller
|
83
|
+
@case = Museum::Case.find_by!(name: 'bootswitch')
|
84
|
+
|
85
|
+
# And then, in your view:
|
86
|
+
@case.loupe('rubygems').detail('downloads')
|
87
|
+
|
88
|
+
## Contributing to Museum
|
29
89
|
|
30
90
|
* Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet.
|
31
91
|
* Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it.
|
@@ -35,8 +95,7 @@ Contributing to Museum
|
|
35
95
|
* Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
|
36
96
|
* Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
|
37
97
|
|
38
|
-
Copyright
|
39
|
-
---------
|
98
|
+
## Copyright
|
40
99
|
|
41
|
-
Copyright (c) 2014-
|
100
|
+
Copyright (c) 2014-2017 Gem Vein. See LICENSE.txt for further details.
|
42
101
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.5.
|
1
|
+
0.5.4
|
@@ -1,5 +1,10 @@
|
|
1
1
|
%h1= :cases.l
|
2
2
|
|
3
3
|
- for gem_case in @cases
|
4
|
-
%h2
|
5
|
-
|
4
|
+
%h2
|
5
|
+
= link_to gem_case.title, [museum, gem_case]
|
6
|
+
%small
|
7
|
+
v#{gem_case.loupe('rubygems').detail('version')}
|
8
|
+
(#{gem_case.name})
|
9
|
+
%p
|
10
|
+
= gem_case.loupe('rubygems').detail('info')
|
@@ -4,8 +4,18 @@
|
|
4
4
|
|
5
5
|
- for loupe in Museum::Loupe.all
|
6
6
|
%h3= loupe.title
|
7
|
-
%
|
7
|
+
%dl
|
8
8
|
- for detail in @case.loupe(loupe.slug)
|
9
|
-
%
|
10
|
-
|
11
|
-
|
9
|
+
%dt
|
10
|
+
= detail.key.titleize.gsub(/( Ur.$)/) { $1.upcase }
|
11
|
+
%dd
|
12
|
+
%code
|
13
|
+
@case.loupe('#{loupe.slug}').detail('#{detail.key}')
|
14
|
+
%dd
|
15
|
+
- case detail.value
|
16
|
+
- when nil
|
17
|
+
%em.disabled nil
|
18
|
+
- when ''
|
19
|
+
%em.disabled blank
|
20
|
+
- else
|
21
|
+
= detail.value
|
@@ -6,7 +6,7 @@ module Museum
|
|
6
6
|
include Rails::Generators::Migration
|
7
7
|
|
8
8
|
def hello
|
9
|
-
output "Museum is ready to
|
9
|
+
output "Museum is ready to display your gems in style.", :magenta
|
10
10
|
end
|
11
11
|
|
12
12
|
# all public methods in here will be run in order
|
data/museum.gemspec
CHANGED
@@ -2,16 +2,16 @@
|
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
3
|
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
|
-
# stub: museum 0.5.
|
5
|
+
# stub: museum 0.5.4 ruby lib
|
6
6
|
|
7
7
|
Gem::Specification.new do |s|
|
8
8
|
s.name = "museum"
|
9
|
-
s.version = "0.5.
|
9
|
+
s.version = "0.5.4"
|
10
10
|
|
11
11
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
12
12
|
s.require_paths = ["lib"]
|
13
13
|
s.authors = ["Karen Lundgren"]
|
14
|
-
s.date = "2017-03-
|
14
|
+
s.date = "2017-03-14"
|
15
15
|
s.description = "For organizations that want to market a gem in style, Museum uses APIs to provide you with an ever-fresh marketing site for your gems."
|
16
16
|
s.email = "karen.e.lundgren@gmail.com"
|
17
17
|
s.extra_rdoc_files = [
|
@@ -57,6 +57,7 @@ Gem::Specification.new do |s|
|
|
57
57
|
"museum.gemspec",
|
58
58
|
"spec/controllers/cases_controller_spec.rb",
|
59
59
|
"spec/dummy/Rakefile",
|
60
|
+
"spec/dummy/app/assets/stylesheets/application.scss",
|
60
61
|
"spec/dummy/app/controllers/application_controller.rb",
|
61
62
|
"spec/dummy/app/helpers/application_helper.rb",
|
62
63
|
"spec/dummy/app/models/application_record.rb",
|
@@ -135,6 +136,7 @@ Gem::Specification.new do |s|
|
|
135
136
|
s.add_runtime_dependency(%q<rails>, ["~> 5.0"])
|
136
137
|
s.add_runtime_dependency(%q<rails-i18n>, ["~> 5.0"])
|
137
138
|
s.add_runtime_dependency(%q<jquery-rails>, ["~> 4.0"])
|
139
|
+
s.add_runtime_dependency(%q<sass-rails>, ["~> 5.0"])
|
138
140
|
s.add_runtime_dependency(%q<haml-rails>, ["~> 0.9"])
|
139
141
|
s.add_runtime_dependency(%q<friendly_id>, ["~> 5.1"])
|
140
142
|
s.add_runtime_dependency(%q<jeweler>, ["~> 2.3"])
|
@@ -151,6 +153,7 @@ Gem::Specification.new do |s|
|
|
151
153
|
s.add_dependency(%q<rails>, ["~> 5.0"])
|
152
154
|
s.add_dependency(%q<rails-i18n>, ["~> 5.0"])
|
153
155
|
s.add_dependency(%q<jquery-rails>, ["~> 4.0"])
|
156
|
+
s.add_dependency(%q<sass-rails>, ["~> 5.0"])
|
154
157
|
s.add_dependency(%q<haml-rails>, ["~> 0.9"])
|
155
158
|
s.add_dependency(%q<friendly_id>, ["~> 5.1"])
|
156
159
|
s.add_dependency(%q<jeweler>, ["~> 2.3"])
|
@@ -168,6 +171,7 @@ Gem::Specification.new do |s|
|
|
168
171
|
s.add_dependency(%q<rails>, ["~> 5.0"])
|
169
172
|
s.add_dependency(%q<rails-i18n>, ["~> 5.0"])
|
170
173
|
s.add_dependency(%q<jquery-rails>, ["~> 4.0"])
|
174
|
+
s.add_dependency(%q<sass-rails>, ["~> 5.0"])
|
171
175
|
s.add_dependency(%q<haml-rails>, ["~> 0.9"])
|
172
176
|
s.add_dependency(%q<friendly_id>, ["~> 5.1"])
|
173
177
|
s.add_dependency(%q<jeweler>, ["~> 2.3"])
|
@@ -0,0 +1,56 @@
|
|
1
|
+
body {
|
2
|
+
font-family: "Helvetica Neue", Arial, Helvetica, sans-serif;
|
3
|
+
}
|
4
|
+
|
5
|
+
.container {
|
6
|
+
width: 800px;
|
7
|
+
margin: auto;
|
8
|
+
}
|
9
|
+
|
10
|
+
h1,
|
11
|
+
h2,
|
12
|
+
h3,
|
13
|
+
h4,
|
14
|
+
h5,
|
15
|
+
h6,
|
16
|
+
.h1,
|
17
|
+
.h2,
|
18
|
+
.h3,
|
19
|
+
.h4,
|
20
|
+
.h5,
|
21
|
+
.h6 {
|
22
|
+
margin-bottom: 0;
|
23
|
+
margin-top: .5em;
|
24
|
+
|
25
|
+
&:first-child {
|
26
|
+
margin-top: 0;
|
27
|
+
}
|
28
|
+
|
29
|
+
small {
|
30
|
+
display: block;
|
31
|
+
}
|
32
|
+
}
|
33
|
+
|
34
|
+
p,
|
35
|
+
ol,
|
36
|
+
ul {
|
37
|
+
margin-bottom: 1em;
|
38
|
+
margin-top: 0;
|
39
|
+
}
|
40
|
+
|
41
|
+
dt {
|
42
|
+
margin-top: 1em;
|
43
|
+
font-weight: bold;
|
44
|
+
}
|
45
|
+
|
46
|
+
dd {
|
47
|
+
margin-left: 0;
|
48
|
+
}
|
49
|
+
|
50
|
+
code {
|
51
|
+
color: #9c9;
|
52
|
+
}
|
53
|
+
|
54
|
+
.disabled {
|
55
|
+
color: #999;
|
56
|
+
}
|
@@ -3,7 +3,9 @@
|
|
3
3
|
%head
|
4
4
|
%link{:rel=>"shortcut icon", :href=>"/favicon.ico"}
|
5
5
|
%meta{"http-equiv"=>"Content-Type", :content=>"text/html;charset=utf-8"}
|
6
|
+
= stylesheet_link_tag 'application'
|
6
7
|
%title Dummy Application
|
7
8
|
|
8
9
|
%body{:class => controller.controller_name}
|
9
|
-
|
10
|
+
.container
|
11
|
+
= yield
|
@@ -3,9 +3,12 @@
|
|
3
3
|
# Version of your assets, change this if you want to expire all your assets.
|
4
4
|
Rails.application.config.assets.version = '1.0'
|
5
5
|
|
6
|
+
# Change the path that assets are served from
|
7
|
+
Rails.application.config.assets.prefix = "/assets"
|
8
|
+
|
6
9
|
# Add additional assets to the asset load path
|
7
10
|
# Rails.application.config.assets.paths << Emoji.images_path
|
8
11
|
|
9
12
|
# Precompile additional assets.
|
10
13
|
# application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
|
11
|
-
# Rails.application.config.assets.precompile += %w( search.js )
|
14
|
+
# Rails.application.config.assets.precompile += %w( search.js )
|
Binary file
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: museum
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Karen Lundgren
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-03-
|
11
|
+
date: 2017-03-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -52,6 +52,20 @@ dependencies:
|
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '4.0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: sass-rails
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '5.0'
|
62
|
+
type: :runtime
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '5.0'
|
55
69
|
- !ruby/object:Gem::Dependency
|
56
70
|
name: haml-rails
|
57
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -267,6 +281,7 @@ files:
|
|
267
281
|
- museum.gemspec
|
268
282
|
- spec/controllers/cases_controller_spec.rb
|
269
283
|
- spec/dummy/Rakefile
|
284
|
+
- spec/dummy/app/assets/stylesheets/application.scss
|
270
285
|
- spec/dummy/app/controllers/application_controller.rb
|
271
286
|
- spec/dummy/app/helpers/application_helper.rb
|
272
287
|
- spec/dummy/app/models/application_record.rb
|