Skip to content
This repository has been archived by the owner on Nov 19, 2018. It is now read-only.

Show mono-gem only by default #28

Merged
merged 1 commit into from Feb 11, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions app/controllers/update_checks_controller.rb
Expand Up @@ -43,12 +43,12 @@ def tool_colors
watchbuild: "#000000",
match: "#FD972D",
screengrab: "#257E6D",
spaceship: "#000000"
spaceship: "#FF33AA"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Because otherwise spaceship has the same color as fastlane

}
end

def graphs
show_fastlane = params[:fastlane] # as fastlane is launched far too often, it's hidden by default
all_tools = params[:all] # as by default we only show fastlane, as we deprecated the other gems

@data = {}
@days_raw = []
Expand All @@ -66,7 +66,7 @@ def graphs
# Number of launches
#
Bacon.all.order(:launch_date).each do |bacon|
next if (!show_fastlane and bacon.tool == 'fastlane')
next if (!all_tools and bacon.tool != 'fastlane')
next if (bacon.launch_date < start_time)

@data[bacon.tool] ||= {
Expand Down
4 changes: 3 additions & 1 deletion app/views/update_checks/graphs.html.erb
Expand Up @@ -18,7 +18,9 @@
<% if fl_data %>
<li>Total number of <i>fastlane</i> launches: <b><%= number_with_delimiter(fl_data[:data].last) %></b></li>
<% end %>
<li>Total number of launches of all tools: <b><%= number_with_delimiter(@cumulative.collect { |a| a[:data].last }.sum) %></b></li>
<% if params[:all] %>
<li>Total number of launches of all tools: <b><%= number_with_delimiter(@cumulative.collect { |a| a[:data].last }.sum) %></b></li>
<% end %>
</ul>

<h3>Cumulative launches</h3>
Expand Down