Class: AblyUi::Core::Showcase

Inherits:
ViewComponent::Base
  • Object
show all
Includes:
Util
Defined in:
lib/ably_ui/core/showcase/showcase.rb

Constant Summary

Constants included from Util

Util::DEFAULT_URL_BASE

Instance Method Summary collapse

Methods included from Util

#abs_url, #append_random_postfix

Constructor Details

#initialize(companies: default_companies, layout: 'quotes') ⇒ Showcase

Returns a new instance of Showcase.

[View source]

5
6
7
8
9
10
# File 'lib/ably_ui/core/showcase/showcase.rb', line 5

def initialize(companies: default_companies, layout: 'quotes')
  @random_id = append_random_postfix('showcase-slides')
  @companies = companies
  @layout = layout
  @companies_data_cache = nil
end

Instance Method Details

#case_studiesObject

[View source]

116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
# File 'lib/ably_ui/core/showcase/showcase.rb', line 116

def case_studies
  {
    hubspot: {
      columns: [
        {
          heading: '$600k',
          text: 'annual savings on infrastructure and DevOps'
        },
        {
          heading: 'LIVE CHAT AND REMOTE COLLABORATION',
          text:
            "Ably’s realtime platform seamlessly supports HubSpot's entire realtime needs and helps us meet technical, business, and product development, requirements.",
          button: {
            label: 'View case study',
            href: '#'
          }
        }
      ]
    },
    lightspeed: {
      columns: [
        {
          heading: '75 million',
          text: 'Students supported in 28,000 schools in 38 countries'
        },
        {
          heading: 'REMOTE LEARNING AND DEVICE MANAGEMENT',
          text:
            'Lightspeed Systems relies on Ably’s realtime platform to enable realtime student safety for remote and classroom learning solutions at scale.',
          button: {
            label: 'View case study',
            href: '#'
          }
        }
      ]
    },
    australian_open: {
      columns: [
        {
          heading: '1.2 million',
          text: 'Fans receiving billions of realtime messages'
        },
        {
          heading: 'SPORTS, MEDIA, & AUDIENCE ENGAGEMENT',
          text:
            'Only Ably meets The Australian Open’s exacting performance targets, reliably delivering realtime scores, updates and commentary to a huge global fan base.',
          button: {
            label: 'View case study',
            href: '#'
          }
        }
      ]
    },
    split: {
      columns: [
        {
          heading: '>1 trillion',
          text: 'Monthly feature flags sent over Ably’s network'
        },
        {
          heading: 'REALTIME FEATURE FLAGS AND ANALYTICS',
          text:
            'Ably’s realtime platform and SSE support enable Split to deliver more than one trillion business-critical feature flags to tens of millions of client apps every month.',
          button: {
            label: 'View case study',
            href: '#'
          }
        }
      ]
    }
  }
end

#companies_dataObject

[View source]

12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# File 'lib/ably_ui/core/showcase/showcase.rb', line 12

def companies_data
  @companies_data_cache ||=
    @companies.map do |key|
       = company_logos[key]
      [:layout] = @layout

      content = @layout != 'quotes' ? case_studies : quotations

      if !content[key]
        # Exception errors can not be rescued
        raise Exception.new "Showcase Error: Can't find content item [#{key}] for layout [#{@layout}]"
      end

      .merge(content[key])
    end
end

#company_logosObject

[View source]

33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# File 'lib/ably_ui/core/showcase/showcase.rb', line 33

def company_logos
  {
    hubspot: {
      name: 'Hubspot',
      logo:
        asset_path('ably_ui/core/images/cust-logo-hubspot-col-pos.png'),
      logo2x:
        asset_path('ably_ui/core/images/cust-logo-hubspot-col-pos@2x.png')
    },
    vitac: {
      name: 'Vitac',
      logo: asset_path('ably_ui/core/images/cust-logo-vitac-col-pos.png'),
      logo2x:
        asset_path('ably_ui/core/images/cust-logo-vitac-col-pos@2x.png')
    },
    split: {
      name: 'Split',
      logo: asset_path('ably_ui/core/images/cust-logo-split-col-pos.png'),
      logo2x:
        asset_path('ably_ui/core/images/cust-logo-split-col-pos@2x.png')
    },
    lightspeed: {
      name: 'Lightspeed',
      logo:
        asset_path(
          'ably_ui/core/images/cust-logo-lightspeed-syst-col-pos.png'
        ),
      logo2x:
        asset_path(
          'ably_ui/core/images/cust-logo-lightspeed-syst-col-pos@2x.png'
        )
    },
    australian_open: {
      name: 'Australian Open',
      logo:
        asset_path('ably_ui/core/images/cust-logo-ausopen-col-pos.png'),
      logo2x:
        asset_path('ably_ui/core/images/cust-logo-ausopen-col-pos@2x.png')
    }
  }
end

#default_companiesObject

[View source]

29
30
31
# File 'lib/ably_ui/core/showcase/showcase.rb', line 29

def default_companies
  %i[hubspot vitac split]
end

#quotationsObject

[View source]

75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
# File 'lib/ably_ui/core/showcase/showcase.rb', line 75

def quotations
  {
    hubspot: {
      quote:
        "Ably’s realtime infrastructure layer seamlessly supports HubSpot's entire realtime needs and helps us meet technical, business, and product development requirements.",
      author: {
        name: 'Max Freiert',
        thumbnail:
          asset_path(
            'ably_ui/core/images/cust-photo-hubspot-max-freiert.jpg'
          ),
        title: 'Product Group Lead / HubSpot'
      }
    },
    vitac: {
      quote:
        'In a high-stakes, highly competitive industry, VITAC sought a provider that could operate realtime infrastructure for transporting live data to end-users via a complex, multi-hop process. In media accessibility environments - where there’s zero margin for error - Ably’s infrastructure performs and exceeds expectations.',
      author: {
        name: 'Joe Antonio',
        thumbnail:
          asset_path(
            'ably_ui/core/images/cust-photo-vitac-joe-antonio.jpg'
          ),
        title: 'Chief Information Officer / VITAC'
      }
    },
    split: {
      quote:
        'You miss so much by not using a platform like Ably. When you need to implement a new feature, the capabilities are there, ready to go. Or when you need to scale, the capacity is seamlessly available. There’s no need to even think about these things. Building on Ably was the only logical choice because we managed to bypass a hefty DevOps debt and rapidly ship our new streaming capabilities while keeping our architecture as simple and reliable as possible.',
      author: {
        name: 'Pato Echagüe',
        thumbnail:
          asset_path(
            'ably_ui/core/images/cust-photo-split-pato-echague.jpg'
          ),
        title: 'Chief Technical Officer / Split'
      }
    }
  }
end